2

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.

1

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/.
3
  • thanks, that sound feasible. Only one issue. The server I'm connecting to is headless, so no browsers there. I need to access the internet via, for instance, wget. Apr 20 '11 at 8:57
  • For wget, set the environment variable http_proxy to http://localhost:8080/. (You can also specify the proxy in .wgetrc.) Apr 20 '11 at 10:09
  • Also ssh -X allows you to run X sessions on your local system May 1 '11 at 15:56
0

Can you "touch" the server you wish to connect to the internet? I'm assuming it's in some sort of DMZ and has network access, just not internet access.

If you can get to the server via SSH "direct" from your system, then configure internet connection sharing on your local system, and get your remote box to use your IP as it's gateway.

1
  • I'm not sure Internet Connection sharing will work with the CISCO VPN up. The server has network access, yes. Apr 20 '11 at 7:38
0

I assume that you can connect via the VPN, so that you are basically a client of the remote local network. From this point, you should already be able to connect to this local "internet-less" linux server. The question is now about the route. You can simply edit your hosts file or just work with the ip of the server. Or do I miss something here?

1
  • My question is about having the "internet-less" server to actually access the internet through an ssh tunnel back to my laptop. Apr 20 '11 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.