Tools / Port checker / 5432
Is port 5432 open?
Port 5432 is PostgreSQL. Enter your server below to test it from Dallas, Amsterdam and London.
What port 5432 is used for
Default port for the PostgreSQL database server. Connection poolers such as PgBouncer commonly listen on 6432 in front of it.
Should port 5432 be open?
Should not face the internet directly. Keep listen_addresses on localhost or a private network, and restrict pg_hba.conf to the hosts that need access.
How to open port 5432
Ubuntu or Debian with ufw, allowing only your own address (replace 203.0.113.10):
sudo ufw allow from 203.0.113.10 to any port 5432 proto tcp
Rocky, Alma or CentOS with firewalld:
sudo firewall-cmd --permanent --add-port=5432/tcp && sudo firewall-cmd --reload
Windows Server, in PowerShell as administrator:
New-NetFirewallRule -DisplayName "Port 5432" -Direction Inbound -Protocol TCP -LocalPort 5432 -Action Allow
Then check that the service listens on all addresses, not only 127.0.0.1, and test again above.
Check another port
Run your service on a PrivateByte server: a firewall you control and every port yours to open.