reverse ssh tunnel listens on wrong interface
Posted
by Jens Fahnenbruck
on Server Fault
See other posts from Server Fault
or by Jens Fahnenbruck
Published on 2010-05-06T20:04:17Z
Indexed on
2010/05/08
8:38 UTC
Read the original article
Hit count: 318
I'm working with a server that is behind a firewall. I have established an ssh tunnel to an intermediate server in the internet like this:
remoteuser@behind_fw$ ssh -N -f -R 10002:localhost:22 middleuser@middle
But I can't connect directly throgh this server, this doesn't work:
user@local$ ssh remoteuser@middle -p 10002
I have to connect in two steps:
user@local$ ssh middleuser@middle
middleuser@middle$ ssh remoteuser@localhost -p 10002
Output of netstat -l on middle:
tcp 0 0 localhost:10002 *:* LISTEN
but it should be something like this:
tcp 0 0 *:10002 *:* LISTEN
how can I achieve this?
© Server Fault or respective owner