I have tried to open a port on a new AL9 machine. The machine reports it is open, but using nmap from another machine (AL8.6) shows it is there but closed.
sudo nmap -sS server_n.local -p 4000-6800
[sudo] password for user1:
Starting Nmap 7.70 ( https://nmap.org ) at 2022-07-04 19:00 EDT
Nmap scan report for server_n.local (192.168.1.23)
Host is up (0.00038s latency).
Not shown: 2800 filtered ports
PORT STATE SERVICE
5432/tcp closed postgresql
Why is this port not open? How can I get it open? Cheers
yes if its reported as closed then postgres isn’t listening on that port, nothing to do with the firewall (which would show as filtered). postgres listens only on localhost by default with listen_addresses = 'localhost'
Yes, I’ve taken care of postgresql: listen_addresses ='127.0.0.1, ::1, localhost, 192.168.1.23, 0.0.0.0'
BTW @jlehtone I don’t know if this is related. The app shows up closed from the box that needs to talk to it, and open on the machine itself:
[Tue Jul 05 12:15:29 user1@server_f ~/rfs] sudo nmap -sS -p 0-10000 server_n.local
[sudo] password for user1:
Starting Nmap 7.70 ( https://nmap.org ) at 2022-07-05 12:15 EDT
Nmap scan report for server_n.local (192.168.1.23)
Host is up (0.00038s latency).
Not shown: 9998 filtered ports
PORT STATE SERVICE
22/tcp open ssh
5432/tcp open postgresql
9090/tcp closed zeus-admin
MAC Address: D0:50:99:87:7B:4A (ASRock Incorporation)
Nmap done: 1 IP address (1 host up) scanned in 58.07 seconds
[Tue Jul 05 12:14:02 user1@server_n ~] sudo nmap -sS localhost
Starting Nmap 7.91 ( https://nmap.org ) at 2022-07-05 12:14 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0000050s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
5432/tcp open postgresql
Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds