IP-FireWall
1.核心加入
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=10
2.編譯 kernel
config mykernel
cd ../../compile/mykernel
make depend all install
3.加入 /etc/rc.conf
firewall_enable="YES"
firewall_type="simple"
firewall_quiet="YES"
tcp_extensions="YES"
4.reboot
5.修改 /etc/rc.firewall
#!/bin/sh
/sbin/ipfw -f flush
#先定義deny,再開放pass
/sbin/ipfw add pass all from any to any