iptables: Setting chains to policy ACCEPT: security raw nat FAILED filter

iptables: Setting chains to policy ACCEPT: security raw nat FAILED filter

这个错误在启动iptables的时候会出现,例如:

[root@i386 ~]# service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: security raw nat[FAILED]filter
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]

 

为了修复这个错误:

打开 /etc/init.d/iptables

$ sudo /etc/init.d/iptables

搜索

Setting chains to policy

然后如下面的绿色的部分

   echo -n $"${IPTABLES}: Setting chains to policy $policy: "
    ret=0
    for i in $tables; do
        echo -n "$i "
        case "$i" in
           security)
               $IPTABLES -t filter -P INPUT $policy \
                   && $IPTABLES -t filter -P OUTPUT $policy \
                   && $IPTABLES -t filter -P FORWARD $policy \
                   || let ret+=1
               ;;
            raw)
                $IPTABLES -t raw -P PREROUTING $policy \
                    && $IPTABLES -t raw -P OUTPUT $policy \
                    || let ret+=1
                ;;

 

然后保存退出,重启iptables。

 

版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则按侵权处理.

    分享到:

Leave a Reply

Your email address will not be published. Required fields are marked *