Re: SSH forwarding - Multiple interfaces

From: Richard E. Silverman (res_at_qoxp.net)
Date: 02/27/04


Date: 26 Feb 2004 18:15:58 -0500


> Hello,
> 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

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 ssh.com software does have
this capapbility, though: ssh -L<MyFirstIP>:L3128:squid-server:3128 ...

-- 
  Richard Silverman
  res@qoxp.net


Relevant Pages

  • Re: Port forwarding to two machines?
    ... Possible lightbulb - is this because my SSH server is not listening on ... your router is supposed to be forwarding inbound ... normal port 22 on the actual server. ...
    (uk.comp.sys.mac)
  • Remote Desktop
    ... >What needs to be done to allow Remote Desktop to acccess ... >than port forwarding and changing the listening ports on ...
    (microsoft.public.windowsxp.work_remotely)
  • Remote Desktop
    ... >>I have followed the directions to change the listening ... >>port for Remote Desktop and forwarded the ports on the ... >>than port forwarding and changing the listening ports ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: BBC TV 4 - Hawkwind: Do not panic
    ... got to the bottom of it), what `forwarding a port' means, or any idea ... it must by definition be sitting listening for incoming connections. ... I get the `port forwarding' idea, but I'm still confused about ports. ... I cannot connect to the hub's Web server any more. ...
    (uk.comp.sys.mac)
  • Re: How did they get behind my NAT?
    ... Not having experience with that router, I can't be sure what limits it ... "default forwarding IP", although it is an option on many. ... I understand that exposing a port exposes any service ... Always remember - only download files from Trusted Sites. ...
    (alt.computer.security)