ssh tunnelling through a firewall
I've just moved into a sublet for the summer, and I die without the ability to ssh to my PC. It's kind of an obsession. Trouble is we can only get ON the wireless router, no administrator password for it. It was apparently setup by the provider, and the people at the house nor the provider know the password. Of course the simple answer is to reset to router, but it's locked in a room we can't get into (short of picking the lock, and believe me I've tried) until the guy who lives in that room comes 'round to visit.
So I'm trying to port forward using an external server I have a shell account on. This could be quickly done if the sshd gateway setting was turned on, but it's not. I've managed a bit of an awkward scenario that works for several minutes then I have to restart all the connections.
Currently I have on the client:
ssh -R1339:localhost:1339 remote.server.com -fN
You'll notice there is no -g, because it cannot be used with remote port forwarding.
On the server I'm running:
screen ssh -L1338:localhost:1339 localhost -g
I screen it and detach it into the background since it flings errors about being unable to bind the port if I just send it to the background.
So since the remote forward from my PC can only be accessed by localhost due to the sshd settings, I have a local forward on the remote machine to itself so that it accepts the connection.
I'm able to get to my PC using:
ssh -p1338 remote.server.com
However after a while (an hour or so), none of the connections respond anymore, though the processes are still running. I have to kill all the processes and start them again to get it going again.
Does anyone have any ideas what might be causing this? IPtables forgetting things? ssh idle time booting me?
Any help would be greatly appreciated.
Last edited by statistic; 05-02-2009 at 10:43 AM.
Reason: Forgot a parameter, and a misspelling