实时警报通知:微信告警通知的重要性解析
665
2023-02-13
解决iptables Setting chains to policy ACCEPT: security raw nat[FAILED]filter
错误重现
1 2 3 4 5 | [root@li254-129~]# service iptables restart iptables:Setting chains topolicy 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)段,修改后如下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # vim /etc/init.d/iptables foriin$tables;do echo-n"$i " case"$i"in raw) $IPTABLES-traw-PPREROUTING$policy\ &&$IPTABLES-traw-POUTPUT$policy\ ||let ret+=1 ;; security) $IPTABLES-tfilter-PINPUT$policy\ &&$IPTABLES-tfilter-POUTPUT$policy\ &&$IPTABLES-tfilter-PFORWARD$policy\ ||let ret+=1 ;; |
重启iptables
1 2 3 4 5 | [root@li254-129~]# service iptables restart iptables:Setting chains topolicy ACCEPT:security raw nat[ OK ]filter iptables:Flushing firewall rules: [ OK ] iptables:Unloading modules: [ OK ] iptables:Applying firewall rules: [ OK ] |
呵呵,问题搞定了~
发表评论
评论列表