Public domain
# vi /usr/src/sys/i386/conf/GENERIC
options IPFIREWALL
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPDIVERT
# cd /usr/src
# make buildkernel KERNCONF=GENERIC
# make installkernel KERNCONF=GENERIC
# reboot
# vi /etc/rc.conf
firewall_enable="YES"
firewall_type="open"
natd_enable="YES"
natd_interface="dc0"
natd_flags="-dynamic -m"
# reboot
( ipfw add divert natd all from any to any via dc0 )
BY: Pejman Moghadam
TAG: ipfw, nat
DATE: 2008-06-12 22:52:41