Postgresql – Postgres 8.4 — connection refused (remote)

postgresql

I'm new to postgres and looking to set up a small environment here with it.

I've installed PostgreSQL 8.4 onto an ubuntu server, able to login to the postgres, submit commands, do queries, etc… however, I'm looking at using pgAdminIII from my windows machine.

I've followed along with the instructions from the ubuntu help page and made the following two changes:

In pg_hba.conf I have added the line (using other IP information, which should be fine as it's tested elsewhere):

host all all 10.0.0.1 255.255.255.0 trust

in postgresql.conf I had originaly set listen_address = 'localhost,10.0.0.1', but changed to listen_address = '*' out of frustration after reading this guide.

How should I configure my listen files here so that postgres isn't listening to * ?

Best Answer

The 10.0.0.1 is the address of your client. What you need to put into listen_addresses is an address on the server. If you don't want to use *, then it should be the address of the server on the same network as the client. In this case this would probably be some other 10.* address. Check with /sbin/ifconfig or ip addr list what address that would be on your host.