Re: Remote Database Connection

Lists: pgsql-general
From: "Nykolyn, Andy (AS)" <andrew(dot)nykolyn(at)ngc(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Remote Database Connection
Date: 2009-11-14 19:30:44
Message-ID: 13F88858CF7E3249B528E55935F52C6A013CAAB3@XMBIL152.northgrum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Is there a way to set up the pg_hba.conf file to allow users to connect
regardless of their IP address? I have users that need to access the
database through a VPN using a non static IP address. Thanks in
advance.


From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Remote Database Connection
Date: 2009-11-14 19:52:27
Message-ID: 20091114195227.GA16488@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Nykolyn, Andy (AS) <andrew(dot)nykolyn(at)ngc(dot)com> wrote:

> Is there a way to set up the pg_hba.conf file to allow users to connect
> regardless of their IP address? I have users that need to access the database
> through a VPN using a non static IP address. Thanks in advance.

Sure, use 0.0.0.0/0 as CIDR-adress.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


From: John R Pierce <pierce(at)hogranch(dot)com>
To: "Nykolyn, Andy (AS)" <andrew(dot)nykolyn(at)ngc(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Remote Database Connection
Date: 2009-11-14 19:55:02
Message-ID: 4AFF0B16.2040803@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Nykolyn, Andy (AS) wrote:
>
> Is there a way to set up the pg_hba.conf file to allow users to
> connect regardless of their IP address? I have users that need to
> access the database through a VPN using a non static IP address.
> Thanks in advance.
>

specify a subnet mask that includes all these non-static VPN IPs

as in..

HOST ALL ALL 172.16.0.0/12 md5

A VPN almost always uses its own subnet range(s) for the remote clients,
they don't appear on your WAN with their own arbitrary IPs, they appear
with IPs that are assigned by the VPN

If you really want to allow all IPs, specify 0.0.0.0/0