CentOS7.5 防火牆指令


防火牆指令

  1. 查看防火牆狀態:

    firewall-cmd --state

  

  2. 啟動防火牆

    systemctl start firewalld.service

 

  3. 關閉防火牆

    systemctl stop firewalld.service

  

  4. 禁止防火牆開機啟動

    systemctl disable firewalld.service

 

---------------------------------------------------------------------------------------------

   5. 釋放端口

    firewall-cmd --zone=public --add-port=80/tcp --permanent    (--permanent永久生效,沒有此參數重啟后失效)

  6. 重新加載

    firewall-cmd --reload

  7. 查看

    firewall-cmd --zone= public --query-port=80/tcp

  8. 刪除

    firewall-cmd --zone= public --remove-port=80/tcp --permanent

 

 

 

如有問題,歡迎糾正!!!

 https://www.cnblogs.com/Charles-Yuan/p/9737460.html


免責聲明!

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



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