Re: IPtables localhost redirect

2010-07-11 Thread Daniele Orlando
>From the netfilter mailing list: http://marc.info/?l=netfilter&m=127377479932181&w=2 http://marc.info/?l=netfilter&m=126950781622980&w=2 http://www.frozentux.net/iptables-tutorial/images/tables_traverse.jpg http://xkr47.outerspace.dyndns.org/netfilter/packet_flow/packet_flow10.png Nothing new, j

Re: IPtables localhost redirect

2010-07-11 Thread Daniele Orlando
On Sat, Jul 10, 2010 at 19:00, Mart Frauenlob wrote: > This picture shows the netfilter traffic flow: > http://jengelh.medozas.de/images/nf-packet-flow.png > > Source address selection is done before the OUTPUT path. > Locally generated packets NEVER hit the PREROUTING chain in mangle or nat > tab

Re: IPtables localhost redirect

2010-07-11 Thread Daniele Orlando
On Sat, Jul 10, 2010 at 13:06, Javier Barroso wrote: > Hi, If you have ssh access to 192.168.1.113, you can try ssh port > forwarding, with -L 5432:192.168.1.113:5432 option > > Regards, Hi Javier, thanks for the tip. Your solution is one of the possible workarounds we came. Another one (I'm usi

Re: IPtables localhost redirect

2010-07-09 Thread Daniele Orlando
On Fri, Jul 9, 2010 at 19:09, Toan Pham wrote: > Here's the trick, > > # Trick the kernel to route localhost ip (127.0.0.1) in prerouting > rule, and continue routing out through the valid network interface > (not the loopback interface). > ifconfig eth0:0 127.0.0.1 > > # Setup NAT Table to redire

Re: IPtables localhost redirect

2010-07-09 Thread Daniele Orlando
On Fri, Jul 9, 2010 at 08:34, Boyd Stephen Smith Jr. wrote: > What have you tried?  It seems like you'd need to change this in a PREROUTING > chain, probably in the mangle table. > > Also, depending on the application it my be using the "unix socket" instead of > TCP/IP to connect to PostgreSQL.  

IPtables localhost redirect

2010-07-08 Thread Daniele Orlando
Hello guys, on my Debian 5 I'm trying to redirect the TCP traffic generated by my machine towards 127.0.0.1:5432 (PostgreSQL) to the new destination 192.168.1.113:5432. I have tried with iptables many rules, but no one seams good for the task. Any idea? -- To UNSUBSCRIBE, email to debian-user