Source address of connections from ssh proxy tunnel

I have a linode with multiple IP addresses. I'm using ssh -D <local port=""> to create a local SOCKS proxy to use an ssh tunnel to this linode.

If I make a TCP connection through this tunnel, the source address is always set to the last public address listed in /etc/network/interfaces (eth0:1 on this box).

I want to be able to select which of the linode's IP addresses to set as the source address when I create the ssh tunnel. I'm fine with running multiple sshds to accomplish this (e.g. connect to a different remote port to use a different source address).

Google and <url url="http://man.he.net/man5/sshd_config">~~[](http://man.he.net/man5/sshd_config)~~[man sshd_config](http://man.he.net/man5/sshd_config)</url> are giving me nothing. I did find the TunnelDevice configuration option in ssh_config, on the client side, which allows one to "Force a specified tun(4) device on the client". Nothing similar seems to be available in the server config, and I have a feeling that messing with tun devices might be the wrong approach anyway.

Ideas?

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct