Building a NanoBSD Router with PPPoE and DJBDNS on a Soekris net5501

Requirements

So I choose a Soekris net5501 so that I would have enough RAM to have a larger RAM disk for the /var partition so I can do more DNS logging. It is also a very quiet machine, with no fans or heatsinks. The software functions (IPv4/v6 routing, DHCP, DNS Cache, etc) will be handled via FreeBSD.

I don't have any 32bit machines around anymore, so I setup a small VMWare image for doing this build in so I have a clean build environment for my gateways. So setup a new VM or machine with a fresh install of the latest FreeBSD Release. For this I am using FreeBSD 8.2-RELEASE.

Pre-configure

Do a checkout of the latest version of FreeBSD into /usr/src

Grab this Kernel Config file: SOEKRIS, which includes a config just for the Soekris hardware and includes PF and AltQ.

Grab this nanobsd config file: myconf.nano, note this is geared towared a 4GB CF card. If you want a different size, you will need to change this.

Create a /usr/ports/packages directory.

I use portmaster to build the following software:

With the following command:

portmaster -dg editors/vim-lite net/rsync mail/postfix security/nmap net/isc-dhcp41-server sysutils/daemontools dns/djbdns editors/job net-mgmt/iftop shells/zsh

Now you should have all the packages you need in /usr/ports/packages.

Create a /usr/src/tools/tools/nanobsd/Pkg directory.

In this directory, create symlinks to the packages you care about in /usr/ports/packages.

Build

Now to do the build and create the image run (from /usr/src/tools/tools/nanobsd):

sh ./nanobsd.sh -c myconf.nano

Install

Copy the built image onto the cf card:

dd if=/usr/obj/nanobsd.custom/_.disk.full of=/dev/da4 bs=2m

Drop the CF card into the Soekris and start up with the serial port connected to another machine so you can watch it boot.

Configure

Now that the machine is booted we will do any last configuration, for the following software:

Powered by FreeBSD! r4l domain registration