1. 程式人生 > >centos 報錯 “Job for iptables.service failed because the control process exited with error code.”的解決辦法

centos 報錯 “Job for iptables.service failed because the control process exited with error code.”的解決辦法

cau ack res sta ble put use wal ror

原因:因為centos7默認的防火墻是firewalld防火墻,不是使用iptables,因此需要先關閉firewalld服務,或者幹脆使用默認的firewalld防火墻。

操作步驟:

關閉防火墻

1.systemctl stop firewalld


2.systemctl mask firewalld

在使用iptables服務

#開放443端口(HTTPS)
3.iptables -A INPUT -p tcp --dport 443 -j ACCEPT

#保存上述規則
4.service iptables save

#開啟服務
5.systemctl restart iptables.service

centos 報錯 “Job for iptables.service failed because the control process exited with error code.”的解決辦法