0
votes

I'm aware that this issue has been asked multiple times, but after searching for hours and trying multiple solutions, nothing has worked for me.

Issue: I cannot connect remotely to my postgresql-9.3 server using pgAdmin III.
The postgres server is on RHEL6 and pgAdmin GUI is on Windows.

pg_hba.conf file: I've just ended up allowing all connections until I figure out the issue.

local   all             all                                     trust
# IPv4 local connections:
host    all             all             0.0.0.0/0               trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

postgres.conf file:

listen_addresses = '*'
port = 5432
max_connections = 100

I have restarted the server, and don't have a password on my postgres user. I can access the server locally, but not remotely.

Any help would be greatly appreciated.

Edit: After running netstat

tcp        0      0 0.0.0.0:5432                0.0.0.0:*                   LISTEN      26369/postmaster   
1
If you connect to the external ip of the server from the local server? Let's say, the server h as ip 192.168.0.100, can you connect to that when you are on the server itself? - Paul
Just tried it and yes I can. - knguyen2525
If that works most likely it's something firewall related. - Paul
Strange. I've gotten this to work before I did not have to change any firewall settings on either side. - knguyen2525
It was a firewall issue. Turned off the firewall on my VM and it worked :) - knguyen2525

1 Answers

0
votes

Firewall issue. Turned off firewall and remote connection worked fine.