PostgreSQL listening only on 127.0.0.1 instead of 0.0.0.0

Solution Verified - Updated -

Issue

  • PostgreSQL service only listening on 127.0.0.1:5432 instead of all available interfaces i.e the service is able to listen locally and not globally.
# netstat -tupln | grep -i 5432 | grep LISTEN
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      26         671472     36131/postmaster     off (0.00/0/0)   <--- Listening locally and bind with 127.0.0.1

  • Telnet is only accepted from localhost.

  • Remote clients are not able to communicate to the PostgreSQL service and getting connection refused error.

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content