Re: port forwarding with binding to specific IP on remote host
- From: comphelp@xxxxxxxxx (Todd H.)
- Date: 14 Aug 2006 15:35:07 -0500
Stefan Palme <kleiner@xxxxxxxxxxxxxxx> writes:
Hi all,
I want to establish an SSH tunnel. The remote host of
the SSH connection has two IP addresses that may be used
for outgoing connections. I want the ssh-tunnel to use
the non-default connection for the "forwarded" connection:
local host has IP 10.0.0.1
remote host has IPs 10.0.0.20 (eth0) and 10.0.0.21 (eth0:1).
I want to establish a tunnel from 10.0.0.1:1234 to
10.0.0.100:1234 using the remote host's IP 10.0.0.21.
When I use
ssh -L 1234:10.0.0.100:1234 root@xxxxxxxxx
the connection from my client host to the remote host
is established *to* IP 10.0.0.21 (of course), but the
host 10.0.0.100 sees IP 10.0.0.20 as source IP for my
connection.
It does so because the default interface for outbound traffic from
your box is the .20.
But I want it to see 10.0.0.21 as source IP.
Then you'll need to specify in your OS's routing tables that you want
traffic destined for .100 to go out eth0:1
Is it possible to solve this with pure ssh-magic, or do I have to
create iptables rules or special routing table entries for this?
I'm willing to be wrong about this, but don't think ssh has ability to
reach this far down into the tcp/ip stack to do what you want here
without some help from routing tables.
Best Regards,
--
Todd H.
http://www.toddh.net/
.
- Follow-Ups:
- Re: port forwarding with binding to specific IP on remote host
- From: Darren Tucker
- Re: port forwarding with binding to specific IP on remote host
- References:
- port forwarding with binding to specific IP on remote host
- From: Stefan Palme
- port forwarding with binding to specific IP on remote host
- Prev by Date: Re: port forwarding with binding to specific IP on remote host
- Next by Date: Re: port forwarding with binding to specific IP on remote host
- Previous by thread: Re: port forwarding with binding to specific IP on remote host
- Next by thread: Re: port forwarding with binding to specific IP on remote host
- Index(es):
Relevant Pages
|
|