阳光越强烈
阴影就越是深邃

Linode启动 iptables 出错的解决方法

启动提示:
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: security raw nat mangle fi[FAILED]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_n[FAILED]

官方解决方法:

I’m sorry to hear this! The issues you’re experiencing with “iptables” is due to our paravirt kernel having a “security” chain compiled into it, and the default “iptables” init script included with CentOS does not know how to handle it. You are able to resolve this issue by downloading an amended version of the “iptables” init script. Please issue the following commands as the “root” user:

1
2
3
4
5
6
7
8
9
10
11
cd /etc/init.d
mv iptables ~/iptables.bak
wget http://epoxie.net/14867.txt && cat 14867.txt | tr -d ‘\r’ > iptables
chmod +x iptables
rm rf 14867.txt
[root@li407231 init.d]# service iptables restart
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: security raw nat mangle fi[  OK  ]
Unloading iptables modules:                                [  OK  ]
Applying iptables firewall rules:                          [  OK  ]

“iptables” should now start successfully:

1
service iptables restart

I hope this helps! If we can be of any further assistance, please don’t hesitate to let us know.

可是根据修改提示Loading additional iptables modules: ip_conntrack_netbios_n [FAILED] 正在费解中。。。

NAT的东东没用 可以注释掉。

注释方法

1
vi /etc/sysconfig/iptablesconfig

找到

1
IPTABLES_MODULES=”ip_conntrack_netbios_ns”

在前面加上#号

1
#IPTABLES_MODULES=”ip_conntrack_netbios_ns”

重启iptables 就OK了。

—————————————————  亲,这是分割线  —————————————————

使用centos 6 安装vpn服务时,在配置ipstables时会遇到如下错误提示:

1
Iptables error – Setting chains to policy ACCEPT: security raw nat mangle filter [FAILED]

多方查找,终于找到解决的方法,如下:

编辑/etc/init.d/iptables 找到

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    echo n $${IPTABLES}: Setting chains to policy $policy: “
    ret=0
    for i in $tables; do
    echo $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
        ;;

注意,带桔红色+号之间的内容是后添加的。

1
service iptables restart

修改后重新启动ipstables服务即可。

赞(0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址