1. 程式人生 > >centos7啟動iptables時報Job for iptables.service failed because the control process exited with error cod

centos7啟動iptables時報Job for iptables.service failed because the control process exited with error cod

異常信息 bsp stop input emctl tro stat mct centos7

centos7啟動iptables時報Job for iptables.service failed because the control process exited with error cod

啟動iptables:

 service iptables start
報錯如下:

Job for iptables.service failed because the control process exited with error code. See "systemctl status iptables.service" and "journalctl -xe
" for details. 查看異常信息: journalctl -xe 錯誤如下: Failed to start IPv4 firewall with iptables. 解決辦法 因為centos7默認的防火墻是firewalld防火墻,不是使用iptables,因此需要先關閉firewalld服務,或者幹脆使用默認的firewalld防火墻。 因為這次報錯的服務器是一臺剛剛購買的阿裏雲服務器,所以在操作上忘記關閉默認防火墻的步驟了才導致浪費了些時間在這件事情上。 關閉firewalld: systemctl stop firewalld systemctl mask firewalld 使用iptables服務: #開放443端口(HTTPS) iptables
-A INPUT -p tcp --dport 443 -j ACCEPT #保存上述規則 service iptables save #開啟服務 systemctl restart iptables.service 正常啟動!!!!

centos7啟動iptables時報Job for iptables.service failed because the control process exited with error cod