centos7 开放防火墙端口

来源:互联网 发布:淘宝信息与实际不符 编辑:程序博客网 时间:2024/06/03 02:34

Centos 7 开启端口

CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的

CentOS 7 采用了 firewalld 防火墙

如要查询是否开启80端口则:

firewall-cmd --query-port=80/tcp

显然80端口没有开启

下面我们开启80端口:

firewall-cmd --add-port=80/tcp


永久关闭防火墙:

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动


0 0
原创粉丝点击