linux下執行防火牆相關指令報錯:Redirecting to /bin/systemctl restart iptables.service


 

安裝systemctl:
yum install iptables-services 設置開機啟動 systemctl enable iptables.service 如果報錯:Failed to start IPv4 firewall with iptables. 因為centos7默認的防火牆是firewalld防火牆,不是使用iptables,因此需要先關閉firewalld服務,或者干脆使用默認的firewalld防火牆。 關閉firewalld: systemctl stop firewalld systemctl mask firewalld 開啟443端口 iptables -A INPUT -p tcp --dport 443 -j ACCEPT 保存規則 service iptables save 開啟服務 systemctl restart iptables.service


免責聲明!

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



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