Use SSH reverse tunnel to bypass VPN [on hold]
- by John J. Camilleri
I have shell access to a server M, but I need to log into a VPN on my machine L in order to access it. I want to be able to get around this VPN, and I've heard I can do this by creating a reverse SSH tunnel and using a intermediate server E (which I can access without the VPN).
This is what I am trying:
Turn on VPN on L, open SSH session to M
On M, execute the command: ssh -f -N -T -R 22222:localhost:22 user@E
From L, try to open SSH session to E on port 22222, hoping to end up at M
Step 2 seems to work without any complaint, but on step 3 I keep getting "connection refused". I have made sure that port 22222 is open on E:
7 ACCEPT tcp -- anywhere anywhere tcp dpt:22222
I'm pretty new to SSH tunnelling and not sure what the problem could be. Any ideas what I can try?