Reverse SSH tunnel active only from localhost
hi.
I'm finding a little difficult to set up a remote tunnel.
the situation is this: I am running a webserver but my ISP uses NAT and I can't connect to it when I'm not at home.
since I have another working linux box with public static IP I figured a reverse tunnel on port 80 would solve all my troubles.
the situation looks like this:
MYWEBSERVER<-->ISP[NAT]<--WWW-->MYLINUXBOX
so I googled a little and found this way to set up a tunnel (the ssh command was run from the MYWEBSERVER shell, hence the 'localhost'):
ssh -nNT -R 80:localhost:80 root@MYLINUXBOX
seems all fine (no error messages) but when I type MYLINUXBOX's address into the web browser all I get is a 'connection refused' message.
BUT (and here is the big mystery) if I open an ssh shell on MYLINUXBOX and type 'lynx localhost' , I can see MYWEBSERVER's website!
btw, before anybody asks, iptables is not installed.
what could be the problem?
|