- 论坛徽章:
- 0
|
内核编制中打开下面的选项
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=100
options IPFIREWALL_DEFAULT_TO_ACCEPT
编译重启。
编辑rc.conf 加入
gateway_enable="YES"
firewall_enable="YES"
firewall_script="/etc/rc.firewall"
firewall_type="/etc/ipfw.conf"
firewall_logging_enable="YES"
新建/etc/ipfw.conf 文件
add 00001 deny log ip from any to any ipopt rr
add 00002 deny log ip from any to any ipopt ts
add 00003 deny log ip from any to any ipopt ssrr
add 00004 deny log ip from any to any ipopt lsrr
add 30000 allow icmp from any to any icmptypes 3
add 30001 allow icmp from any to any icmptypes 4
add 30002 allow icmp from any to any icmptypes 8 out
add 30003 allow icmp from any to any icmptypes 0 in
重启后显示上面规则已经打开。
可是用在PING还能PING到,可是netstat -an 检测不到是谁在PING..
因为只当游戏服务器只要能防别人PING就可以了..
谢谢~ |
|