Installing and Configuring Your Firewall/Router

Required Mac Hardware:

Installation:

  1. Get the disktools image to allow you to partition your Macs hard drive. You will want to partition the hard drive to include at least a 50 MB NetBSD Root&Usr partition and a 16 MB swap partition. Follow the instructions in my install guide on how to do this.
  2. Make sure you have the latest tar archive. You will need about 15 MB of disk space to store the archive. I have used external hard drives or ZIP disk drives for this purpose and they work fine. If you have enough room on the Mac partition of your hard drive you may use it instead.
  3. Following the partitioning and formatting of your drive, use the NetBSD installer to extract the firewall archive to your NetBSD partition. This process may take 30 minutes on slower Macs, so it might be time for a coffee break.
  4. DO NOT BUILD THE DEVICES USING THE INSTALLER, it's already been done in the archive.
  5. Once the archive has been extracted, you are ready to boot your Mac into NetBSD.

Booting and Configuration:

  1. Default settings for the firewall are as follows:
  2. Pay close attention to the boot messages that appear on the screen while your machine is starting up. Depending on your ethernet interfaces available on you Mac you may see messages containing ae0, ae1, sn0, sn1, mc0. These are your network interfaces as NetBSD sees them. Typing the command "dmesg" will also list these interfaces.
  3. Login to the machine as root to make configuration changes. No password required until you change it using "passwd root".
  4. If required, change your internal interface by typing " mv /etc/ifconfig.ae0 /etc/ifconfig.xx0" at the command prompt, where xx can be sn or mc.
  5. Set your DHCP server on this interface by editing /etc/rc.conf and changing the following line where xx0 is the name of your internal interface as defined in step 4:

    dhcpd=YES dhcpd_flags="-q xx0"

  6. If required, change your external interface by typing " mv /etc/ifconfig.ae1 /etc/ifconfig.xx1" at the command prompt, where xx can be sn or mc.
  7. If you changed your external interface name, you will have to change your IP NAT settings by editing the /etc/ipnat.conf file. You only need to change ae1 to the name of your external interface using the "xx1" format. Replace the two instances of ae1.
  8. If you changed your external interface name you will also need to change the IP filter settings. Edit /etc/ipf.conf and change all "ae1" values to the value of your external interface.
  9. Reboot your maching by typing "reboot" once your are done configuring the interfaces.

Using Your Firewall:

Questions or Problems: Please Send Me An Email