CentOS7 查看和关闭防火墙

CentOS 7 默认使用的是firewall作为防火墙

查看防火墙状态

firewall-cmd --state

停止firewall

systemctl stop firewalld.service

禁止firewall开机启动

systemctl disable firewalld.service

Centos7开放及查看端口

https://www.cnblogs.com/heqiuyong/p/10460150.html

– 开放指定端口

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

– 关闭指定端口

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

– 重启防火墙

firewall-cmd --reload

CentOS7 防火墙(firewall)的操作命令

https://www.cnblogs.com/leoxuan/p/8275343.html

posted @ 2021-11-17 22:38  幻月无名  阅读(136)  评论(0编辑  收藏  举报