0

On my Raspberry Pi at home, I have a reverse SSH tunnel to my VPS server using these instructions: http://www.tunnelsup.com/raspberry-pi-phoning-home-using-a-reverse-remote-ssh-tunnel

On the Raspberry Pi: ssh -N -R 2222:localhost:22 root@x.x.x.x

On the VPS: ssh -l root -p 2222 localhost

That is working. When I login to my VPN and run that command I'm connected to my Raspberry Pi at home. I need to keep that configuration in place for a pentesting dropbox. Until I actually need to use it as a dropbox, I need to be able to proxy my work internet connection through the VPS to the RPi at home for local net and internet access.

What I haven't been able to get working is to be able to use Putty to create a SSH tunnel through my VPS and use my internet connection at home. What configuration do I need to use on Putty and on my VPS to complete this tunnel? I need to be able to use the tunnel for home internet access as well as accessing (RDP, HTTP, SSH, etc) computers on my home network.

Edit: VPS=Virtual Private Server. I have a virtual server in the cloud. My Raspberry Pi at home connects to the VPS via ssh. From work or wherever on the internet I ssh to the VPS server and enter the command "ssh -l root -p 2222 localhost" and I enter the password for my Raspberry Pi and get a shell prompt on it. Now I'd like to be able to use ssh (Putty on Windows) to ssh to my VPS so that I can connect to LAN IP addresses at home as well as use my home internet connection. I'm sure I could make things simpler by portforwarding ssh on my home router to my Raspberry Pi and just bypassing the VPS to connect directly to the Raspberry Pi, but I don't want it to be bombarded by SSH brute force attempts. I already have my VPS hardened against those attacks.

  • SSH aside, could you clarify.. 'cos I thought a VPS is like when a provider gives you a virtual machine to work on, and it's not on your network. Whereas a VPN is something you run and when you're on a remote machine such as a phone or computer in a cafe, you can connect to it and join your network. So do you have a provider that provides you with a VPS and you then connect in some way to that, e.g. SSH or VNC, and then connect that VPS to your VPN? – barlop Jul 12 '16 at 14:46
  • i'd be interested if you can address that above.. Also, there's another guy that did the same tunnelsup link superuser.com/questions/933462/user-transparent-ssh-multihop though his one was possibly way more complicated – barlop Jul 12 '16 at 14:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.