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


原因:因為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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM