免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1856 | 回复: 4
打印 上一主题 下一主题

ipfw的静态规则为什么不起作用? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-10-25 09:31 |只看该作者 |倒序浏览
我重新编译了内核,其中加了
options IPFIREWALL
options IPDIVERT
选项
同时也配置了rc.conf
gateway_enable="YES"
firewall_enable="YES"
firewall_script="/etc/rc.firewall"
firewall_type="/etc/ipfw.conf"
firewall_quiet="NO"
firewall_logging_enable="YES"

ipfw.conf的内容如下
add 00400 divert natd ip from any to any via xl0  
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 00005 deny tcp from any to any in tcpflags syn,fin  

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
add 30004 allow icmp from any to any icmptypes 11 in
######lan#####
add 50000 allow all from 10.41.17.46 to any
add 50001 allow all from any to 10.41.17.46
add 50002 allow all from 10.41.17.1 to any
add 50003 allow all from any to 10.41.17.1

其中10。41。17。1是FreeBSD所在的机器IP,另外一个是WIN2K3的机器IP
。在系统启动后显示ipfw2加载正常
但是就是不能相互ping通,也不能联结

只有使用了动态规则
#ipfw add 50004 allow all  from any to any
后才可以进行连接。


请教各位大侠,这个静态规则不加载是什么原因??

论坛徽章:
0
2 [报告]
发表于 2003-10-25 18:43 |只看该作者

ipfw的静态规则为什么不起作用?

你是freebsd什么版本的>?

论坛徽章:
0
3 [报告]
发表于 2003-10-25 18:52 |只看该作者

ipfw的静态规则为什么不起作用?

顺序是不是要调整一下。


#ipfw add 50004 allow all from any to any

应该在最前面!

论坛徽章:
0
4 [报告]
发表于 2003-10-25 21:05 |只看该作者

ipfw的静态规则为什么不起作用?

我猜也可能是顺序问题吧,我看别人写的,一般50004那条都是排在最前面几条的吧。

论坛徽章:
0
5 [报告]
发表于 2003-10-25 22:02 |只看该作者

ipfw的静态规则为什么不起作用?



楼主的头像很有个性!

猪我见得多了,这么帅的很少!

-----------------------上大学前我就是杀猪的!

----------------------- 所以我口才好!人家都夸我像卖猪肉的!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP