Thread: configure same pg_hba.conf file for both ipv4 and ipv6 network

configure same pg_hba.conf file for both ipv4 and ipv6 network

From
Manohar Bhattarai
Date:
Hi,

 I want to configure the pg_hba.conf for a network in which we have both ipv4 and ipv6 machines. How can I use a single pg_hba.conf file for that network?
Current ipv6 setting is :
# IPv6 local connections:
host testpc all ::1/128 trust

The error its giving in log file is:

Dec 14 07:53:10 support-desktop postgres[25448]: [2-1] LOG:  connection received: host=127.0.0.1 port=XXXXX
Dec 14 07:53:10 support-desktop postgres[25448]: [3-1] FATAL:  no pg_hba.conf entry for host "127.0.0.1", user "XXXX", database "XXXX", SSL off

Please help me set this configuration.

--
Regards,
Manohar Bhattarai (मनोहर भट्टराई)
http://about.me/manoharbhattarai
http://www.facebook.com/pages/Manohar-Bhattarai/130973796914160
Blogs:
http://manoharbhattarai.wordpress.com/
Microblogs:
Twitter :- http://twitter.com/mhrbhattarai
Identi.ca :- http://identi.ca/manoharbhattarai

Re: configure same pg_hba.conf file for both ipv4 and ipv6 network

From
Craig Ringer
Date:


On Dec 14, 2011 3:59 PM, "Manohar Bhattarai" <manoharbhattarai@gmail.com> wrote:
>
> Hi,
>
>  I want to configure the pg_hba.conf for a network in which we have both ipv4 and ipv6 machines. How can I use a single pg_hba.conf file for that network?
> Current ipv6 setting is :
>
> # IPv6 local connections:
>
>
>
> host    testpc         all         ::1/128               trust

Add another line for IPv4 connections that uses

127.0.0.1 255.0.0.0

to specify the address and mask.

>
>
> The error its giving in log file is:
>
> Dec 14 07:53:10 support-desktop postgres[25448]: [2-1] LOG:  connection received: host=127.0.0.1 port=XXXXX
> Dec 14 07:53:10 support-desktop postgres[25448]: [3-1] FATAL:  no pg_hba.conf entry for host "127.0.0.1", user "XXXX", database "XXXX", SSL off
>
> Please help me set this configuration.
>
> --
> Regards,
> Manohar Bhattarai (मनोहर भट्टराई)
> http://about.me/manoharbhattarai
> http://www.facebook.com/pages/Manohar-Bhattarai/130973796914160
> Blogs:
> http://manoharbhattarai.wordpress.com/
> Microblogs:
> Twitter :- http://twitter.com/mhrbhattarai
> Identi.ca :- http://identi.ca/manoharbhattarai