Linux – Reverse SSH tunnel from Internet-less server

linuxssh-tunnelwindows 7

I have the following scenario:

Win laptop --> Cisco VPN --> SSH --> Internet-less linux server

Now, I need to install node.js on that server but it is a pain to do so without an Internet connection, so I was wondering if, given the above setup, it is possible to create a reverse tunnel from the server back to my laptop, so that the server can connect to the internet.
I reckon that the VPN can be a show-stopper, but in case someone has an idea…

Edit: I have no root privileges on the server.

Best Answer

Before you do anything, make sure that you are not violating any security policies imposed by your organization. If that's not an obstacle, here's what I'd do. There may be somewhat simpler ways.

  • Install a web proxy server on your Windows laptop. Squid and Apache are both fine choices. Choose a free port for the proxy server, say 8080.
  • In your SSH configuration on the laptop, set up a remote tunnel that maps destination port 8080 to source localhost, port 8080. How to do so depends on what SSH client you are using.
  • SSH to the Linux server. Set your web browser to use the proxy server http://localhost:8080/.