免费注册 查看新帖 |

Chinaunix

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

ipfilter的疑问 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-03-01 11:47 |只看该作者 |倒序浏览
奇怪啊,我编译内核加了:
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK
以后连ping都ping不通了,提示我no route to host怎么回事啊?

论坛徽章:
0
2 [报告]
发表于 2004-03-01 12:09 |只看该作者

ipfilter的疑问

原帖由 "wuming122" 发表:

options IPFILTER_DEFAULT_BLOCK
尘飞扬_cq 该用户已被删除
3 [报告]
发表于 2004-03-01 12:46 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
4 [报告]
发表于 2004-03-01 14:28 |只看该作者

ipfilter的疑问

我把那句话注释掉了还不对啊

论坛徽章:
0
5 [报告]
发表于 2004-03-01 14:33 |只看该作者

ipfilter的疑问

我在内核里只加了这么两句:
options IPFILTER
options IPFILTER_LOG
/etc/rc.conf里也加了:
firewall_enable="NO"                              

gateway_enable="YES"
ipfilter_enable="YES"
ipf -C  -f  /etc/ipf.conf
ipfilter_flags="-E"
ipnat的我没加,因为我只要它作防火墙的.
/etc/ipf.conf 如下:
block in log quick all with short
block in log quick all with ipopts
block in log quick all with frag
block in log quick all with opt lsrr
block in log quick all with opt ssrr

pass in  on r10 all
pass out on r10  all
pass in  quick on lo0  all
pass out quick on lo0  all

pass in  quick on r10  from any to any port < 1024
pass out quick on r10  from any to any port < 1024

这样有问题吗???
尘飞扬_cq 该用户已被删除
6 [报告]
发表于 2004-03-01 15:13 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
7 [报告]
发表于 2004-03-01 15:25 |只看该作者

ipfilter的疑问

加了一句ipfilter_program="/etc/ipf.conf" 以后可以用了,不过options IPFILTER_DEFAULT_BLOCK
内核里是注释掉的,我再加上试试

论坛徽章:
0
8 [报告]
发表于 2004-03-01 15:35 |只看该作者

ipfilter的疑问

完蛋了,把内核里加了options IPFILTER_DEFAULT_BLOCK 之后,在rc.conf里去掉了ipf -C -f /etc/ipf.conf ,重新启动以后执行:
ipf -Fa
ipf -f /etc/ipf.conf
只能ping通127.0.0.1了,ping其他还是提示no route to host啊
尘飞扬_cq 该用户已被删除
9 [报告]
发表于 2004-03-01 16:01 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
10 [报告]
发表于 2004-03-01 16:11 |只看该作者

ipfilter的疑问

我又试试,内核里还是:
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK
然后在/etc/ipf.conf里只写两句:
pass in quick all
pass out quick all
这样都可以了,但我只想开个www和ftp服务,想让ssh可以连接,该如何写这个规则?还有看了好多资料,上面的那句:
pass out quick on lo0 all
那个lo0是干什么的?我只有一个网卡r10,是不是只需要写个:
pass out on r10 all
pass in on r10 all就行了?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP