# WHATPORT(5432)

## NAME

port 5432 — PostgreSQL — PostgreSQL client protocol, TCP 5432.

Protocol: TCP  
IANA registry

## DESCRIPTION

The postgres server listens on TCP 5432 by default (the `port` parameter), and listen_addresses defaults to localhost, so an out-of-the-box install accepts only loopback TCP plus Unix-domain sockets. Seeing it on a scan means someone set listen_addresses to '*' or a real interface — common for containerized deploys, managed database endpoints, and pgbouncer front-ends. Who may connect from where is then decided by pg_hba.conf, which is a separate gate from the listener.

## EXPOSURE

**Do not expose.** Keep it on localhost or a private network; if it must cross a network, require hostssl plus scram-sha-256 in pg_hba.conf rather than relying on the port being obscure.

## CHECK

```sh
psql -h DB_HOST -p 5432 -U postgres -c 'SELECT version();'
```

## SEE ALSO

- docs — [PostgreSQL docs — Connection Settings (port, listen_addresses)](https://www.postgresql.org/docs/current/runtime-config-connection.html) (postgresql.org)
- docs — [PostgreSQL docs — The pg_hba.conf File](https://www.postgresql.org/docs/current/auth-pg-hba-conf.html) (postgresql.org)
- source — [PostgreSQL (GitHub mirror)](https://github.com/postgres/postgres) (github.com)
- iana — [IANA Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml) (iana.org)

---

HTML: <https://whatport.net/5432/> · JSON: <https://whatport.net/5432.json> · full dataset: <https://whatport.net/ports.json>
