CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的
CentOS 7 采用了 firewalld 防火墙
如要查询是否开启80端口则:
[root@joe-pc ~]# firewall-cmd --query-port=80/tcp
no
显然80端口没有开启
下面我们开启80端口:
[root@joe-pc ~]# firewall-cmd --add-port=80/tcp
success
原文链接:
本文介绍了如何在CentOS7系统中使用firewalld防火墙开启80端口的方法,并提供了相应的命令示例。
CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的
CentOS 7 采用了 firewalld 防火墙
如要查询是否开启80端口则:
[root@joe-pc ~]# firewall-cmd --query-port=80/tcp
no
显然80端口没有开启
下面我们开启80端口:
[root@joe-pc ~]# firewall-cmd --add-port=80/tcp
success
原文链接:
3366
218

被折叠的 条评论
为什么被折叠?