1、開放埠
firewall-cmd --zone=public --add-port=5672/tcp --permanent# 開放5672埠
firewall-cmd --zone=public --remove-port=5672/tcp --permanent#關閉5672埠
firewall-cmd --reload# 配置立即生效
firewall-cmd --zone=public --list-ports
如果要開放的埠太多,嫌麻煩,可以關閉防火牆,安全性自行評估
systemctl stop firewalld.service
方式一:firewall-cmd --state
方式二:systemctl status firewalld.service --centos7
ps:centos7預設沒有 netstat 命令,需要安裝 net-tools 工具,yum install -y net-tools
Centos7開放及檢視埠
1 開放埠 firewall cmd zone public add port 5672 tcp permanent 開放5672埠 firewall cmd zone public remove port 5672 tcp permanent 關閉5672埠 firewall cmd reload...
Centos7開放及檢視埠
1 開放埠 firewall cmd zone public add port 5672 tcp permanent 開放5672埠 firewall cmd zone public remove port 5672 tcp permanent 關閉5672埠 firewall cmd reload...
Centos7開放及檢視埠
1 開放埠 開放5672埠 firewall cmd zone public add port 5672 tcp permanent 關閉5672埠 firewall cmd zone public remove port 5672 tcp permanent 配置立即生效 firewall cmd...