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...

link|improve this question
feedback

1 Answer

 # 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
link|improve this answer
+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. – voretaq7 Jul 18 '11 at 18:23
/255 is Very Wrong, but /32 is also probably not right. I suspect that Jake is trying for /24 – DerfK Jul 19 '11 at 2:54
agreed, /32 should be /24 ... my mistake. – Goez Jul 19 '11 at 14:25
feedback

Your Answer

 
or
required, but never shown

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