On Tue, 10 May 2016 09:50:10 -0400, "D'Arcy J.M. Cain" <darcy@xxxxxxxxx> wrote: >On Mon, 09 May 2016 18:15:16 -0400 >Tom Lane <tgl@xxxxxxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general