首页 文章

80号港口在Centos 7关闭,提供火警服务

提问于
浏览
2

我正在使用Centos 7,并尝试打开端口80和443 .

按照centos 7 - open firewall portRHEL7: How to get started with FirewalldHow to open http port 80 on Redhat 7 Linux using firewall-cmd和其他一些人的指示,我有以下内容:

[ricardo@m42srv02 ~]$ firewall-cmd --list-all
  public (default, active)
  interfaces: enp0s3
  sources: 0.0.0.0/0
  services: dhcpv6-client http https ssh
  ports:
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:

[ricardo@m42srv02 ~]$

即使我添加端口80 / tcp和443 / tcp而不是添加服务,结果也是如此,来自其他机器:

[root@m42srv01 ~]# nmap -T4 -sV -p 1-444 192.168.1.12

Starting Nmap 5.51 ( http://nmap.org ) at 2015-06-04 04:33 CEST
Nmap scan report for 192.168.1.12
Host is up (0.017s latency).
Not shown: 441 filtered ports
PORT    STATE  SERVICE VERSION
22/tcp  open   ssh     OpenSSH 6.6.1 (protocol 2.0)
80/tcp  closed http
443/tcp closed https
MAC Address: 08:00:27:C1:8D:25 (Cadmus Computer Systems)

Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 4.28 seconds
[root@m42srv01 ~]#

我尝试添加服务和端口,使用--permanent选项,有和没有源,每次更改后总是重新加载防火墙,甚至有时重启firewalld服务,但这些端口总是关闭 .

Iptables被禁用 .

1 回答

  • 2

    试试: firewall-cmd --zone=public --add-port=80/tcp --permanent

    在CentOS Linux 7.1.1503版(Core)上为我工作

相关问题