iptables: Setting chains to policy ACCEPT: security raw nat[FAILED]filter
對運作是沒什麼影響,但看了總是覺得怪怪的~
錯誤訊息:
[root@www ~]# service iptables restart
iptables: Setting chains to policy ACCEPT: security raw nat[FAILED]filter
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
錯誤原因:
Linode官方在iptables裡面加了一個security的規則鏈,但是centos不支持,既然不支持,那就修復囉
解决iptables: Setting chains to policy ACCEPT: security raw nat[FAILED]filter
找到如下case段,在raw後面加上security)段,修改後如下。
# vi /etc/init.d/iptables
QUOTE:
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
;;
security)
$IPTABLES -t filter -P INPUT $policy \
&& $IPTABLES -t filter -P OUTPUT $policy \
&& $IPTABLES -t filter -P FORWARD $policy \
|| let ret+=1
;;
重啟 iptables
[root@www ~]# service iptables restart
iptables: Setting chains to policy ACCEPT: security raw nat[ OK ]filter
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
這樣就搞定了~