Live data from Hacker News

Putting Freebsd on little Wi-Fi router devices

adrianchadd.blogspot.com

21–30 of 37 posts

Re: Putting Freebsd on little Wi-Fi router devices

#21
post #13
post #11

My primary use-case in small border firewalls like this is running sshuttle on them as a lightweight VPN. The problem is, FreeBSD cannot properly run sshuttle - it can do it for regular traffic, and it works well, but it cannot do DNS lookups for the entire network over the tunnel. This shortcoming is documented by the sshuttle README @ github.[1] I am very interested in having this fixed / worked around and am willi…

You sure you linked the right repo? There are forks with newer activity, and the linked readme doesn't say anything about DNS not working? (Or I'm to tired right now to find it) Is any of the forks a new "official" version?

If this is still a problem then yeah, join #freebsd on efnet and ask for some help. :)

Re: Putting Freebsd on little Wi-Fi router devices

#22
> Others have added ipfw support to do NAT and firewalling - I'm going to add configuration rules for NAT, IPFW and routing soon so it's all integrated.

I thought that most of the BSD world had transitioned to PF at this point. I checked FreeBSD handbook and indeed all three firewalls are supported: IPF, IPFW, PF. Are the older ones still really relevant?

Re: Putting Freebsd on little Wi-Fi router devices

#23
post #16

Earlier quoted context omitted.

Not $50 and you probably don't already own one, but it can be done on the Uniquiti EdgeRouter Lite ($100, runs Debian MIPS + Vyatta as the default officially-supported Ubiquiti image but very hackable): http://rtfm.net/FreeBSD/ERL/

to get the performance people are constantly raving about, you need the very proprietary binary blobs that take full advantage of the Cavium hardware acceleration. otherwise it's just another beefy MIPS machine.

Yes, this is an important bit of subtext that most people don't realize.

Re: Putting Freebsd on little Wi-Fi router devices

#24
post #11

My primary use-case in small border firewalls like this is running sshuttle on them as a lightweight VPN. The problem is, FreeBSD cannot properly run sshuttle - it can do it for regular traffic, and it works well, but it cannot do DNS lookups for the entire network over the tunnel. This shortcoming is documented by the sshuttle README @ github.[1] I am very interested in having this fixed / worked around and am willi…

Where in the README does it state that it is unable to do DNS?

Re: Putting Freebsd on little Wi-Fi router devices

#25
post #18
post #17

Earlier quoted context omitted.

I believe it's impossible to squeeze relatively recent (9 or 10) FreeBSD versions down to that size. The linked git repo makes mention of needing at least 8MB for some builds. And you don't get IPv6 at that size.

Yup. OpenWRT uses (patched!) Linux, but with a much smaller set of libraries/utilities to fit in small storage footprints. I'm using ye normal FreeBSD libc, libcrypto, etc - things are pretty big. It could be fun to take something like the BSD kernel and an alternative BSD licenced userland to make a much smaller footprint device, but I don't have the energy to /also/ do that. If someone would like to do that then pl…

Can you build a BSD on a case-insensitive file system? I wanted to look at modifying openwrt to fit on my routers but I was shocked to discover that linux needs a case-sensitve file system to build.

Anyway, it was a good read, thanks.

Re: Putting Freebsd on little Wi-Fi router devices

#26
post #20
post #14

Earlier quoted context omitted.

ok. how do I add support for other similar Atheros MIPS SoCs? I have a few, and a bit of FreeBSD user/admin experience; but the kernel config files in the wifi git repo might as well have be conjured up using magic, to me. more directly: how'd you do what you did? :)

Aha! Jump into #freebsd on IRC (on efnet, don't ask) and poke me (adri) and/or ask for help. If it's the same SoC in a different box, then it isn't too hard: * Attach serial console, boot to uboot. If you're using a d-link then you likely can't without some hardware hacking (and even then they sometimes disable serial RX in u-boot. Grr.) If you're using tp-link then you mash 'tpl' at the console whilst uboot is count…

Can't help myself, why is there an official efnet and freenode channel? What's the deal there?

Re: Putting Freebsd on little Wi-Fi router devices

#27
post #22

> Others have added ipfw support to do NAT and firewalling - I'm going to add configuration rules for NAT, IPFW and routing soon so it's all integrated. I thought that most of the BSD world had transitioned to PF at this point. I checked FreeBSD handbook and indeed all three firewalls are supported: IPF, IPFW, PF. Are the older ones still really relevant?

ipfw's popular, well supported, and not going anywhere. It's still the default FreeBSD firewall[1], PC-BSD recently switched their default to it[2], and DragonFlyBSD recently rewrote it[3].

1: https://svnweb.freebsd.org/base/head/etc/rc.firewall?view=ma...

2: https://forums.pcbsd.org/showthread.php?tid=19683

3: http://www.dragonflybsd.org/docs/ipfw2/

Re: Putting Freebsd on little Wi-Fi router devices

#28
post #22

> Others have added ipfw support to do NAT and firewalling - I'm going to add configuration rules for NAT, IPFW and routing soon so it's all integrated. I thought that most of the BSD world had transitioned to PF at this point. I checked FreeBSD handbook and indeed all three firewalls are supported: IPF, IPFW, PF. Are the older ones still really relevant?

pfsense is using PF, and I'm not going to try and take any steam away from them.

ipfw is small, lightweight and fine for what I'm experimenting with.

If people want to include pf and send me a pull request with that as an option then by all means, please do!

Re: Putting Freebsd on little Wi-Fi router devices

#29
post #18

Earlier quoted context omitted.

Yup. OpenWRT uses (patched!) Linux, but with a much smaller set of libraries/utilities to fit in small storage footprints. I'm using ye normal FreeBSD libc, libcrypto, etc - things are pretty big. It could be fun to take something like the BSD kernel and an alternative BSD licenced userland to make a much smaller footprint device, but I don't have the energy to /also/ do that. If someone would like to do that then pl…

Can you build a BSD on a case-insensitive file system? I wanted to look at modifying openwrt to fit on my routers but I was shocked to discover that linux needs a case-sensitve file system to build. Anyway, it was a good read, thanks.

nope, it only builds inside freebsd for now. that's a bit of a sore point which I'd like to fix, but .. you know, ENOTIME.

Re: Putting Freebsd on little Wi-Fi router devices

#30
post #26
post #20

Earlier quoted context omitted.

Aha! Jump into #freebsd on IRC (on efnet, don't ask) and poke me (adri) and/or ask for help. If it's the same SoC in a different box, then it isn't too hard: * Attach serial console, boot to uboot. If you're using a d-link then you likely can't without some hardware hacking (and even then they sometimes disable serial RX in u-boot. Grr.) If you're using tp-link then you mash 'tpl' at the console whilst uboot is count…

Can't help myself, why is there an official efnet and freenode channel? What's the deal there?

FreeBSD's older than freenode. Inertia is.. inertia. A lot of FreeBSD developers only hang out on efnet, so that's where a lot of stuff happens.
Post reply on HN