本文主要是介绍iptables: Applying firewall rules: iptables-restore: line 13 failed [FAILED],希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在使用amdin01:5601访问浏览器的时候,一直不能进行正常访问,原因是防火墙关闭,导致5601的端口不能进行正常的访问,因此想尝试重新开启防火墙任务,但是开启失败。
[root@admin01 ~]# /etc/init.d/iptables restart
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: iptables-restore: line 13 failed [FAILED]
解决方法
[root@admin01 ~]# iptables -N RH-Firewall-1-INPUT
[root@admin01 ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[root@admin01 ~]# vi /etc/sysconfig/iptables
-ARH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5601 -j ACCEPT # 添加到该目录下
[root@admin01 ~]# service iptables restart # 重新启动端口
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
重新启动后,则显示正常。此时则可以通过浏览器访问Kibana页面,并可以进行相关的操作。
这篇关于iptables: Applying firewall rules: iptables-restore: line 13 failed [FAILED]的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!