查看防火墙状态
firewall-cmd --state
停止firewall
systemctl stop firewalld.service
禁止firewall开机启动
systemctl disable firewalld.service
Centos7开放及查看端口
https://www.cnblogs.com/heqiuyong/p/10460150.htm
开放指定端口
firewall-cmd --zone=public --add-port=1935/tcp --permanent
关闭指定端口
firewall-cmd --zone=public --remove-port=5672/tcp --permanent
重启防火墙
firewall-cmd --reloadl
评论区