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

查看防火墙状态

firewall-cmd --state

停止firewall

systemctl stop firewalld.service

禁止firewall开机启动

systemctl disable firewalld.service 

转自:CentOS 6和CentOS 7防火墙的关闭

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

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐