| From: | George Neuner <gneuner2(at)comcast(dot)net> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Using both ident and password in pg_hba.conf |
| Date: | 2016-05-10 14:46:39 |
| Message-ID: | jks3jb596lv5v6ogu57rgd7gf679kd7std@4ax.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Tue, 10 May 2016 09:50:10 -0400, "D'Arcy J.M. Cain"
<darcy(at)druid(dot)net> wrote:
>On Mon, 09 May 2016 18:15:16 -0400
>Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> > I did think of that but how do I define that in pg_hba? The host
>> > field only specifies the remote IP, not the local one.
>>
>> Right, but you'd be using it essentially as a loopback interface.
>> Say you set it up as 192.168.0.42 --- you'd tell PHP to connect to
>> Postgres on 192.168.0.42, and Postgres would also see the PHP
>> connections as coming in from 192.168.0.42.
>
>Can you expand on this? I can't seem to get my head around it. How
>does the client make it look like it is coming from this ersatz
>loopback IP? In fact, I don't even need to add this to pg_hba since
>anything outside of my trusted IPs requires a password
On Linux (or Unix) you'd set up a forwarding record in iptables that
redirects a second port to Postgresql.
http://www.cyberciti.biz/faq/linux-port-redirection-with-iptables/
I don't know offhand a way to do that on Windows, but I presume that
it is possible.
George
| From | Date | Subject | |
|---|---|---|---|
| Next Message | D'Arcy J.M. Cain | 2016-05-10 15:20:05 | Re: Using both ident and password in pg_hba.conf |
| Previous Message | D'Arcy J.M. Cain | 2016-05-10 13:56:42 | Re: Using both ident and password in pg_hba.conf |