Port 5432: PostgreSQL

PostgreSQL database connections. Keep on localhost or a private network; use SSH tunnels or a VPN for remote access.

  • Free
  • No Sign-Up
  • Runs in Your Browser

Examples:

Ports

1 of 41

Port Lookup

Port 5432 at a glance

Port5432
ProtocolTCP
ServicePostgreSQL
Open to the Internet?No, keep it on a private network
See What Is Listeningss -lntup | grep ':5432 '
Test From Outsidenc -zv your-server 5432
Block with UFWufw deny 5432/tcp
Block with nftablesnft add rule inet filter input tcp dport 5432 drop

PostgreSQL uses TCP port 5432. PostgreSQL database connections.

Keep on localhost or a private network; use SSH tunnels or a VPN for remote access.

If ss shows something listening on port 5432 on a public address, bind it to 127.0.0.1 or a private interface in the service's own configuration, and drop the port in the firewall as well.

Questions

What is port 5432 used for?
PostgreSQL. PostgreSQL database connections.
Is it safe to open port 5432?
No, keep it on a private network. Keep on localhost or a private network; use SSH tunnels or a VPN for remote access.
How do I check if port 5432 is open?
On the server, ss -lntup | grep ':5432 ' shows what is listening. From another machine, nc -zv your-server 5432 shows whether the firewall lets it through.
How do I block port 5432?
With UFW: ufw deny 5432/tcp. With nftables, add a drop rule for dport 5432 in your input chain.

Abuse from open ports on your VMs?

Frabs spots amplification, scans and floods leaving any VM and stops them, without touching your firewall.