Port forwarding via iptables to postgres listening locally

From: David Resnick <abunetta(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org, zhong ming wu <mr(dot)z(dot)m(dot)wu(at)gmail(dot)com>
Subject: Port forwarding via iptables to postgres listening locally
Date: 2011-06-19 04:07:57
Message-ID: BANLkTim_oO_gd+AxUGN9HYO21qMqOXDeXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a posgres instance configured to listen at the localhost default. I'm
trying to enable port forwarding via iptables. I set up the following rule:

iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport
5432 -j REDIRECT

and can see that it is redirecting packets received at port 5432. But I am
unable to establish a remote connection to the postgres instance.

Actually my situation seems to be the same as in this [1] question (
Message-id: <AANLkTim7uAXOvwp=pjR6uEUcoN-8ttmgKw7mU0x4ofWY(at)mail(dot)gmail(dot)com>
).

Thanks in advance,
David

[1] http://archives.postgresql.org/pgsql-general/2010-11/msg00783.php

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daron Ryan 2011-06-19 05:08:31 Re: Search for lists
Previous Message David Johnston 2011-06-19 04:03:53 Re: Referencing function value inside CASE..WHEN