CentOS是免費開源的Linux發行版之一,它兼容RHEL並由社區進行維護,大多數美國服務器提供對該系統支持。在使用CentOS系統時,您需要瞭解一些常用命令,比如開啓、查看、關閉防火牆等。本文將介紹下CentOS防火牆的常用命令。
CentOS是一種面向企業級服務器環境的Linux發行版,具有穩定性、安全性和可靠性等企業級特性。它通常被廣泛用於服務器、數據中心和企業級環境中,提供了廣泛的軟件包和工具,適合於搭建各種服務器應用。
、關閉防火牆
systemctl stop fiewlld
2、開啓防火牆
systemctl stt fiewlld
3、關閉開機啓動
systemctl disble fiewlld
4、開啓開機啓動
systemctl enble fiewlld
5、開啓某個端口(如:223端口)
fiewll-cmd Rzone=public Rdd-pot=9080/tcp Rpemnent
fiewll-cmd Relod
6、查詢端口號(如:223端口) 是否開啓:
fiewll-cmd Rquey-pot=223/tcp
7、查詢有哪些端口是開啓的:
fiewll-cmd Rlist-pot