1. 檢視firewall 狀態
2. 修改firewall增刪查埠資訊systemctl status firewall
systemctl stop firewall
systemctl start firewall
systemctl restart firewall
歡迎關注## 新增埠3306
firewall
-cmd--zone
=public
--add
-port
=3306
/tcp
--permanent
## 重新裝置配置資訊,使新配置生效
firewall
-cmd
--reload
## 檢視埠3306是否被加到firewall名單中
firewall
-cmd
--zone
=public
--query
-port
=3306
/tcp
## 刪除埠3306
firewall
-cmd
--zone
=public
--remove
-port
=3306
/tcp
--permanent
firewall 常用命令
關閉防火牆 systemctl stop firewalld.service 停止firewall systemctl disable firewalld.service 禁止firewall開機啟動 開啟埠 firewall cmd zone public add port 80 tcp perm...
firewall 常用命令 update
允許指定ip到指定埠 firewall cmd permanent add rich rule rule family ipv4 source address 192.168.x.x port protocol tcp port 8080 accept firewall cmd permanent ...
CentOS7 Firewall防火牆常用命令
開啟防火牆systemctl start firewalld.service關閉防火牆systemctl stop firewalld.service檢視防火牆狀態systemctl status firewalld.service開啟開機啟動防火牆systemctl enable firewall...