SSH forwarding - Multiple interfaces

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I've got a linux box with multiples interfaces (eth0; eth0:1; ...). I
would like to have 2 ssh clients forwarding the same port, but
listening on different IP.

ssh -C -b MyFirstIP -l user ip_host  -L3128:squid-server:3128  -g

I thought that the ssh client will listen forwarded port only on ip
"MyFirstIP". But a netstat -a shows :

tcp   0      0 *:squid                 *:*             LISTEN

No way to have something like :

tcp   0      0 MyFirstIP:squid         *:*             LISTEN

Any idea ?

Thanks in advance


Re: SSH forwarding - Multiple interfaces

Quoted text here. Click to load it

The -b options affects the source socket of the SSH connection, not port
forwarding.  OpenSSH does not have this option; forwarding listens on
either the loopback or all interfaces.  The software does have
this capapbility, though: ssh -L<MyFirstIP>:L3128:squid-server:3128 ...

  Richard Silverman

Site Timeline