centos7之查看和关闭防火墙
CentOS7查看和关闭防火墙
查看防火墙状态
firewall-cmd --state
停止firewall
systemctl stop firewalld.service
禁止firewall开机启动
systemctl disable firewalld.service
– 开放指定端口
firewall-cmd --zone=public --add-port=1935/tcp --permanent
– 关闭指定端口
firewall-cmd --zone=public --remove-port=5672/tcp --permanent
– 重启防火墙
firewall-cmd --reloadl