Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

 # 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
share|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

Your Answer

 
discard

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.