Ядро:
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_FORWARD
options IPFIREWALL_VERBOSE_LIMIT=100
options IPDIVERT
/etc/rc.conf
gateway_enable="YES"
firewall_enable="YES"
firewall_script="/etc/rc.firewall"
natd_program="/sbin/natd"
natd_enable="YES"
natd_interface="xl0"
/etc/rc.firewall
${fwcmd} add 100 pass all from any to any via lo0
${fwcmd} add 200 deny all from any to 127.0.0.0/8
${fwcmd} add 300 deny ip from 127.0.0.0/8 to any
${fwcmd} add 400 divert natd ip from INT_ADDRESS/24 to any out via xl0
${fwcmd} add 500 divert natd ip from any to 195.195.195.195 in via xl0
${fwcmd} add 65000 pass all from any to any
${fwcmd} add 65535 deny all from any to any
xl0 - интерфейс, смотрящий на провайдера
INT_ADDRESS/24 - маска серых адреса в лок.сети (10.0.0.0/24 или 192.168.0.0/24)
195.195.195.195 - реальный IP на xl0
По поводу двух последних правил, ну можно и так.
P.S.
2 Micle
А причем тут наряду c ipfw идущие в ядре ipfilter\ipnat, это же уже из другой оперы.
options IPFILTER #ipfilter support
options IPFILTER_LOG #ipfilter logging