- 论坛徽章:
- 0
|
后续问题:
缺省的设置,ipfw show的结果:
00050 3138005 1637674582 divert 8668 ip4 from any to any via bce0
00100 1250 103628 allow ip from any to any via lo0
00200 0 0 deny ip from any to 127.0.0.0/8
00300 0 0 deny ip from 127.0.0.0/8 to any
65000 6159999 3289751415 allow ip from any to any
65535 0 0 allow ip from any to any
直接用ipfw add命令行的方式添加之后ipfw show的结果:
00011 2059 87660 allow ip from any to me dst-port 80
00012 0 0 allow ip from any to me dst-port 20.21
00013 1544 4474318 allow ip from me to any
00050 3138005 1637674582 divert 8668 ip4 from any to any via bce0
00100 1250 103628 allow ip from any to any via lo0
00200 0 0 deny ip from any to 127.0.0.0/8
00300 0 0 deny ip from 127.0.0.0/8 to any
65000 6159999 3289751415 allow ip from any to any
65535 0 0 allow ip from any to any
但是,当我把
firewall_script="/etc/rc.firewall" # firewall防火墙的默认脚本
firewall_type="/etc/ipfw.conf" # firewall自定义脚本
加到rc.conf中,并把原先是空的ipfw.conf文件中加入:
add 11 allow ip from any to me 80
add 12 allow ip from any to me 20,21
add 13 allow ip from me to any
随后再启动服务器,此时的ipfw show结果是:
00011 2059 87660 allow ip from any to me dst-port 80
00012 0 0 allow ip from any to me dst-port 20.21
00013 1544 4474318 allow ip from me to any
00100 0 0 allow ip from any to any via lo0
00200 0 0 allow ip from any to 127.0.0.0/8
00300 0 0 allow ip from 127.0.0.0/8 to any
65535 2515 171861 allow ip from any to any
这行没了:
00050 divert 8668 ip4 from any to any via bce0
从而也不能共享上网了。奇怪?有可能是哪里的故障呢?(rc.firewall没修改过)
是我编辑ipfw.conf的方式不对吗? |
|