I'm struggling to enable remote connection on Postgres running on Ubuntu. I've done the following steps:
- Opened up the firewall; running sudo netstat -ntlp | grep LISTEN gives me:
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 2947/postgres
- Added in listen_addresses to postgresql.conf:
listen_addresses='*' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all
- Added in the connection table in pg_hba.conf as follows:
# TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all peer
I can connect locally but I cannot connect remotely; not even connecting via telnet works. It just says connection refused. Has anyone got an idea as to the cause of the problem?
Thanks.
Cheers,
Neil