Centos7防火牆常用命令

2021-10-03 18:09:50 字數 941 閱讀 4237

1.啟動防火牆

systemctl start firewalld
2.關閉防火牆

systemctl stop firewalld
3.檢視狀態

systemctl status firewalld
4.開機啟用防火牆

systemctl enable firewalld
5.開機禁用防火牆

systemctl disable firewalld
1.開放某個埠,如8080埠

firewall-cmd --zone=public --add-port=8080/tcp --permanent

firewall-cmd --reload
2.檢視防火牆鎖開放的埠

firewall-cmd --zone=public --list-ports
3.檢視某個埠的訪問許可權,如8080

firewall-cmd --zone=public --query-port=8080/tcp
4.關閉某個埠的防火牆,如8080埠

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

CentOS7 防火牆常用命令

啟動 systemctl start firewalld 檢視狀態 systemctl status firewalld 禁用,禁止開機啟動 systemctl disable firewalld 停止執行 systemctl stop firewalld 重啟防火牆 systemctl resta...

centos7防火牆常用命令

centos7使用systemctl指令來管理系統的單一服務,在centos7中對於firewalld 防火牆 服務的開啟 關閉 狀態查詢也同樣是使用該指令,操作如下 啟動防火牆 systemctl start firewalld 檢視防火牆狀態 systemctl status firewalld...

Centos 7 防火牆常用命令

1.關閉防火牆 臨時 僅對本次開機有效,重啟後防火牆會再次啟用 systemctl stop firewalld.service 永久 重啟後防火牆依然關閉 systemctl disable firewalld.service2.開啟防火牆 啟動 systemctl start firewalld...