Re: Setting up security for development - Mailing list pgsql-novice

From Michael Swierczek
Subject Re: Setting up security for development
Date
Msg-id 68b5b5880907231315g5160020bte5ebbdb92964fa@mail.gmail.com
Whole thread Raw
In response to Re: Setting up security for development  (Michael Gould <mgould@intermodalsoftwaresolutions.net>)
Responses Re: Setting up security for development  (Saul Lozano <lozano.saul@gmail.com>)
List pgsql-novice
I'm no expert, but I believe the format of your pg_hba.conf is wrong.

>>
>> # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
>>
>> # IPv4 local connections:
>> #host    all         all         127.0.0.1/32
>> host    all         all         192.168.1.0/32 255.255.255.0        trust
>> # IPv6 local connections:
>> host    all         all         ::1/128               md5
>>
The error is this
host    all         all         192.168.1.0/32 255.255.255.0        trust

I think you want
192.168.1.0/24    OR
192.168.1.0 255.255.255.0

I don't know if specifying both would work.
Also /32 means that all four groups of numbers must match, so you can
only connect from the exact IP address 192.168.1.0.
/8  means you can connect from 192.anything
/16 means 192.168.anything
/24 means 192.168.1.anything
/32 means 192.168.1.0 exact match

-Mike Swierczek

pgsql-novice by date:

Previous
From: Michael Swierczek
Date:
Subject: SSL root.crt read problem for Postgres 8.4
Next
From: "Net Tree Inc."
Date:
Subject: Question on Load balancing