OpenBSD (6.0) Home Router

Something about using the black box my ISP provided to control my whole network just didn’t sit right with me, so I decided to ditch it and make my own using the  industrie’s go-to firewall operating system: OpenBSD.

I started with an Alix2d2, a single board x86 machine with low power consumption, and a BT OpenReach modem. Both pre-owned and picked up on Ebay for very reasonable prices, I also had to buy a null modem cable to connect to the Alix, a Ralink RT2561T MiniPCI WLAN module and antenna  for wireless connectivity.

The only way to  install the operating system onto the Alix (apart from copying a snapshot onto the memory card) is a network install, so we will need to setup tftpd and dhcpd.

TFTPD Setup

38400 in the default baud rate for the alix2d2 so I’ve set that in the boot.conf

# mkdir -p /tftpboot/etc
# cd /tftpdboot
# wget http://mirror.bytemark.co.uk/pub/OpenBSD/6.0/i386/bsd.rd
# wget http://mirror.bytemark.co.uk/pub/OpenBSD/6.0/i386/pxeboot
# echo "stty com0 38400
set tty com0
boot tftp:/bsd.rd" >> etc/boot.conf
# tftpd /tftpboot

/etc/dhcpd.conf

The box we’re installing from is 192.168.1.10.

 option domain-name-servers 192.168.1.1;
subnet 192.168.1.0 netmask 255.255.255.0 {
 filename "pxeboot";
 range 192.168.1.8 192.168.1.254;
 option routers 192.168.1.10;
 option broadcast-address 192.168.1.10;
 option subnet-mask 255.255.255.0;

After restarting  dhcpd we are ready to start installing, connect the Alix to the box you’re installing from, connect the null modem cable and boot it up.

Continue reading “OpenBSD (6.0) Home Router”