linode centos6.2 iptables Setting chains to policy ACCEPT: security raw nat[FAILED]filter

今天刚买了一个linode玩,在启动iptables时,出现了Setting chains to policy ACCEPT: security raw nat[FAILED]filter
google一搜找到了解决办法

vi /etc/init.d/iptables 找到

for i in $tables; do
        echo -n "$i "
        case "$i" in
            raw)
                $IPTABLES -t raw -P PREROUTING $policy \
                    && $IPTABLES -t raw -P OUTPUT $policy \
                    || let ret+=1
                ;;

加入以下内容到“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
        ;;

结果

    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
                ;;

保存后,重启则可
service iptables restart

  1. 暂无评论

  1. 暂无 Trackback

return top