I'm on centos 7 using firewalld.
I've configured firewalld so 443 is open:
$ sudo firewall-cmd --zone=public --permanent --list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: couchdb2 dhcpv6-client http https ssh
ports: 443/tcp 5984/tcp
protocols:
masquerade: no
forward-ports:
sourceports:
icmp-blocks:
rich rules:
$ sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
Warning: ALREADY_ENABLED: 443:tcp
success
apparently port 443 is open, but ...
$ curl https://127.0.0.1:443
curl: (7) Failed connect to 127.0.0.1:443; Connection refused
I also test it using the web tool at http://www.yougetsignal.com/tools/open-ports/
I type in my IP address and port 443 and get: Closed Port 443 is closed on {my-ip}
What could be going wrong? It seems to open and yet it isn't.
I query netstat with this result:
$ sudo netstat -lnp | grep 443
udp 0 0 127.0.0.1:323 0.0.0.0:*
443/chronyd
udp6 0 0 ::1:323 :::*
443/chronyd
Once I fixed my nginx.conf to properly listen to 443 the result looked like:
$ sudo netstat -lnp | grep 443
tcp 0 0 0.0.0.0:443 0.0.0.0:*
LISTEN 10197/nginx: master
tcp6 0 0 :::443 :::*
LISTEN 10197/nginx: master
udp 0 0 127.0.0.1:323 0.0.0.0:*
443/chronyd
udp6 0 0 ::1:323 :::*
443/chronyd