SSH tunnel only listening on loopback device. Should also listen on eth0
I have a server at home. Work normally just connects up to it with a reverse ssh connection such that I can get at the work computer easily. The work computer does a few tunnels one for ssh and another for http. The home server recently died. How convent it was that I was working on a new one at the time. Unfortunately it wasn't quite as complete as I expected.
The SSH tunnel is still working fine (after all the keys and such had been copied over). The HTTP tunnel isn't working the way it use to. server: IP: 192.168.0.57 home computer: IP: 192.168.0.90 work computer: IP: 10.5.2.28 Previously I would connect to work by pointing my home computer at "192.168.0.57:8220" and if I wanted to connect to ssh I would connect up to the server and ssh to "127.0.0.1:9220" netstat is currently showing this: Code:
tcp 0 0 127.0.0.1:9220 0.0.0.0:* LISTEN Code:
tcp 0 0 0.0.0.0:9220 0.0.0.0:* LISTEN Code:
ssh -axfTCR 8220:127.0.0.1:80 michael@home sleep 6h I've tried putting a -g on the options. Along with putting the ip address of the home server in front of the port (192.168.0.90:8220:127...) I've looked through ssh_config and sshd_config on both sides. But nothing has stuck out to me or worked yet. The one notable difference that I could think of is the old server (that recently died) was Fedora 2 the new server is CentOS 5.2. Any thoughts on what could get this working would be greatly appreciated. Thanks, Michael |
Maybe you can try this way
ssh -axfTCR eth0-ip:8220:127.0.0.1:80 michael@home sleep 6h because this is the way i tunnel in the linux gateway and keep alive (ssh -f user@idcserver.net -p 8022 -L 192.168.1.1:8080:idcserver.net:8118 sleep 30d) hope you get the idea with this |
Also look for 'autossh', it keeps tunnels alive automagically.
|
It seems that adding:
Code:
GatewayPorts yes Thank you very much for your help though and for letting me know about autossh, I didn't know that it existed and could be much nice then a cron script. Thanks again, Michael |
All times are GMT -5. The time now is 02:19 AM. |