I am running Postgres 9.1 on Ubuntu. I have host all all my.ip.address/32 md5 set in pg_hba.conf and listen_addresses= '*' set in postgresql.conf. Running show listen_addresses shows '*' Running sudo netstat -ltnp | grep postgres shows

tcp        0      0  *               LISTEN      28899/postgres
tcp6       0      0 :::5432                 :::*                    LISTEN      28899/postgres

However, I sill cannot connect to the DB using pgAdmin III on my machine that is located at "my.ip.address". What could I have missed in the set up?

Thank you.

  • 1
    What error message do you get in Pgadmin ? What if you try psql -h your.server.ip -U youruser -d yourdatabase -W from your client machine ? Is there any firewall inbetween ?
    – alci
    Commented Apr 21, 2014 at 9:12
  • 1
    Thank you for your comment, it made me realize one thing I did NOT check. The problem turned out to be a blocked OUTGOING port on my network. Thank you for taking the time to comment!
    – MrMMM
    Commented Apr 21, 2014 at 13:48

1 Answer 1


You have to configure the following two files


host all all md5



Make sure to restart postgres service after changing the files.

You have to check if the port 5432 is open: http://www.yougetsignal.com/tools/open-ports/

If it's not then add a rule to your iptables:

iptables -A INPUT -s 0/0 -p tcp --dport 5432 -j ACCEPT

0/0: If you want anybody to access it. You can change it to a specific IP address or range of IP addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.