0

I'm having trouble getting postgres to allow remote access over the LAN. The 2 conf files are as follows...

#postrges.conf # - Connection Settings - .200 is where the server's IP listen_addresses = '192.168.0.200,localhost' port = 5432 ... #pg_hba.conf # IPv4 local connections: host all all 127.0.0.1/32 md5 # allow LAN connections only... host all all 192.168.0.0/255 md5 

Whats wrong here? The postgres server won't even restart...

1 Answer 1

2
 # allow LAN connections only... host all all 192.168.0.0/255 md5 

try to change that into CIDR notation

 # allow LAN connections only... host all all 192.168.0.0/32 md5 

try to change

listen_addresses = '192.168.0.200,localhost' 

into

listen_addresses = '*' 

About the not restarting: check your postgres logfile or on liux: /var/log/syslog

If the postgres server is restarting, check if its running on the needed interfaces using

 netstat -tapn 
3
  • +1 - Host lists in pg_hba.conf are CIDR masks. /255 IS NOT a valid CIDR mask (even IPv6 only understands up to /128). Consult the man page for more information. Commented Jul 18, 2011 at 18:23
  • /255 is Very Wrong, but /32 is also probably not right. I suspect that Jake is trying for /24 Commented Jul 19, 2011 at 2:54
  • agreed, /32 should be /24 ... my mistake. Commented Jul 19, 2011 at 14:25

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.