Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to give remote access to my postresql db (8.2) to computers that are at the same lan, at the default config I have added this line to pg_hba.conf where xxx.xx.xx.xx is the ip of the machine that hosts postgresql. This machine is a windows 2k server.

# IPv4 local connections:
host    all         all         password
host    all         all         xxx.xx.xx.xx/24         password

There no firewall or such blocking the connection between and `listen_addresses = '*' for postgresql.conf .

share|improve this question
Use Sysinternals' TCPView or Process Explorer to check if PgSQL is really listening for an incoming connection. – afrazier May 22 '10 at 2:35

So I'm guessing it isn't working?

Presumably it should be host all all xxx.xx.xx.0/24 password not host all all xxx.xx.xx.xx/24 password

share|improve this answer
thanks for the suggestion but neither works :( – Hellnar Nov 18 '09 at 12:37

pg_hba applies the first rule to match, so your second line is never used. Where is it blocking ? network or authentication ? If it's authentication, you may want to try the md5 method (s/password/md5/).

share|improve this answer
giving me "not listening" from the remote machine, tried md5 but doesn't help – Hellnar Nov 18 '09 at 12:38
Then check all these settings… -> listen_addresses defaults to 'localhost' – Benoît Nov 19 '09 at 10:35

I've recently done this on Postgres 8.3. I did it on a linux system, but the procedure sounds similar.

I followed the instructions here

It looks like the only significant difference is instead of 'password' in the hba conf it is 'trust'. Essentially I believe that means it allows the host to connect with any user versus password which takes a cleartext password.

That setting may rule out a password issue.

The next thing I'd suggest is to try adding a single IP address for a specific host and try connecting. You could also try connecting locally, by specifying the server's ip address.

share|improve this answer

Error messages should be logged in your application eventlog. You should look there to troubleshoot your configuration (and maybe append the errors from the logs to your question to give us the possibility to help you).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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