Date: Thu, 10 Mar 2005 08:12:20 -0500 From: Andrei Faust Tanasescu <ftanasescu@gmail.com> To: freebsd-questions@freebsd.org Subject: ipfw tango Message-ID: <76955fbe05031005125973018b@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello, I have a legacy application that makes a direct connection to a hardcoded IP address and port. I need this connection to be made instead transparently through a SSH tunnel. For this to work, I need to tell the kernel to forward all packets destined to myserver:myport instead go to localhost:mySshTunnelPort. So far so good. The tunnel works correctly yet I can't rewrite those packets to go through the tunnel. Here's the rule sudo ipfw add fwd localhost,5555 tcp from any to 12.129.232.116 3724 All goes well, the rule is added, it's even hit, but it fails to work. To make matters even more confusing, I've tried to forward ports only on localhost i.e. a telnet on localhost 555 gets transparently rewritten to localhost 333. Again, the rule is hit since the counter is incremented in ipfw show, yet the connection is NEVER completed. Any ideas? -- Andrei Faust Tanasescu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?76955fbe05031005125973018b>