Never expose to the internet

Port 5432 — PostgreSQL

The default PostgreSQL port.

Port
5432
Service
PostgreSQL
Protocol
TCP

Security guidance

Private network only. If you must expose it, require TLS with client certificates and restrict by IP.

Test port 5432 yourself

From your own machine, against any host (swap in your domain):

macOS / Linux — netcat

nc -vz example.com 5432

Any OS — nmap

nmap -p 5432 example.com

Windows — PowerShell

Test-NetConnection example.com -Port 5432

open = a service answered on port 5432; closed = the host replied but nothing is listening; filtered = a firewall silently dropped the probe. These test from your network — our port checker tests from the outside, the view that matters for security.

Is port 5432 open on your server?

Test it from outside your network — the only view that matters.

Check port 5432