Chinaunix

标题: 请问CENTOS5.3 里的iptables 的问题 [打印本页]

作者: asusmlan2    时间: 2010-06-01 16:52
标题: 请问CENTOS5.3 里的iptables 的问题
在这个系统的版本中,iptables的一些规则有配置文件吗?

是不是全是靠命令打上去

另外比如我打了:iptables -t nat -A PREROUTING -i eth1 -p tcp -s 192.168.1.0/24 --dport 80 -j REDIRECT --to-ports 3128
然后我再iptables --list
为何只有:
Chain INPUT )policy ACCEPT)
targe       prot opt source                destination

Chain FORWARD (policy ACCEPT)
target     prot opt source                 destination

Chain OUPUT (policy ACCEPT)
taret       prot opt source                destination

Chain RH-Firewall-l-INPUT ( 0 references)
taret       prot opt source                 destination

为何会多出最下面的一行Chain Rh-Fiewall-l-INPUT  一般不是只有三个吗?
这个RH-Firewall-l-input 是什么意思啊

之前我已经打过iptables -F
清空规则了。
作者: 7717060    时间: 2010-06-01 18:10
Rh-Fiewall-l-INPUT 那个是自定义链用-X可以删除
try
iptables -t nat  -L  就能看见你加的那个了
作者: chenyx    时间: 2010-06-01 21:11
iptables -t nat  -L查看
默认是filter链
作者: asusmlan2    时间: 2010-06-02 10:07
非常感谢二位
作者: asusmlan2    时间: 2010-06-02 10:13
iptables -t nat  -L查看
默认是filter链
chenyx 发表于 2010-06-01 21:11



    是不是我输入的规则是写入filter链的啊!
作者: chenyx    时间: 2010-06-02 10:26
回复 5# asusmlan2


    -t nat 指定nat链
不加-t就是默认链(filter)
作者: chenyx    时间: 2010-06-02 10:28
iptables -t nat -A PREROUTING -i eth1 -p tcp -s 192.168.1.0/24 --dport 80 -j REDIRECT --to-ports 3128
这个指令加入规则到nat链里面了
楼主先看看iptables指南吧(论坛里面有,白金版主写的)
作者: asusmlan2    时间: 2010-06-02 10:40
好的




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2