In this howto We will learn how to configure FreeBSD as a Router using PF (Packet Filter).

PF (Packet Filter, know as pf) is a BSD licensed statefull firewall. It is comparable to linux iptables, ipfw and ipfilter. PF is developed by OpenBSD, but has been ported to many other operating system like FreeBSD.

FreeBSD 7.2 will be used for this tutorial. Let’s breakdown that what we want and what should we do.

PRELIMINARY SETUP

1) Configure network cards for internal and external network in /etc/rc.conf file.

ifconifg_rl0=”inet 192.168.1.1 netmask 255.255.255.0″
ifconifg_rl1=”inet 202.199.199.199 netmask 255.255.255.240″

2) Set the defaultrouter in /etc/rc.conf assigned by your ISP.

Defaultrouter=”202.199.199.1″ Read the rest of this entry »