mliudong

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

CentOS 7 采用了 firewalld 防火墙

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

1
2
[root@joe-pc ~]# firewall-cmd --query-port=80/tcp
no

显然80端口没有开启

下面我们开启80端口:

1
2
[root@joe-pc ~]# firewall-cmd --add-port=80/tcp
success
 

分类:

技术点:

相关文章:

  • 2022-01-07
  • 2022-02-09
  • 2022-12-23
  • 2021-11-20
  • 2021-11-12
  • 2022-01-24
  • 2021-10-08
猜你喜欢
  • 2021-11-30
  • 2022-01-11
  • 2022-02-09
  • 2022-01-07
  • 2022-01-07
相关资源
相似解决方案