Home > Linux, VMware > Use an SSH proxy to access the internet around a firewall

Use an SSH proxy to access the internet around a firewall

I was using an ESX Server as an SSH tunnel to access the webpage of one of my VMs that was on a different network than my laptop today and I thought it might be useful for people.  Particularity if you want to set up a proxy server to access the internet via a Linux system you might have running outside of your corporate firewall. This would be very useful to access sites that are blocked by your company or use it to download bittorrents etc.

What you need is

  • A Linux system on the internet (running at home, a cheap VM (like this site is running on rapidvps.com, or maybe one running on VMware Workstation at home), or maybe your home router)
  • Putty (or a console shell if using Linux)
  • A Web Browser (or any application you want to access the internet, like bittorrent or whatever).

Windows:

  1. First you need to have SSH access to your Linux system. Not necessarily root.
  2. Use Putty to create a connection to your system. But before you connect look at the options on the left.
  3. Select SSH > Tunnels
  4. Here enter a source port of 1080 and select the Dynamic Radio button.
  5. Select add.tunnelport
  6. Next open your session to your linux system
  7. Configure your application to use a Socks proxy over port 1080. For example in Firefox  select Tools > Options > Advanced > Network > Settings and configure it to use a SOCKS proxy as below.

Linux:

  1. First you need to have SSH access to your Linux system. Not necessarily root.
  2. Open an SSH session to your system using the following syntax ssh -D 1080 user@mylinux
  3. Configure your application to use a Socks proxy over port 1080. For example in Firefox select Tools > Options > Advanced > Network > Settings and configure it to use a SOCKS proxy as below.

firefox

X Forwarding:

Also Linux has a cool feature called X Forwarding. If you open a session to a Linux server from a Linux server (or using a program like Exceed in Windows) using the X flag i.e. ssh -X user@mylinux then you can simply open the GUI of the web browser on the remote machine. I use this for bittorrent.

For example there is not much use in proxying bittorroent to my machine in work. I’d mush rather have it downloaded at home. So I ssh -X to my server at home. Run the command ktorrent & and hey presto the Ktorrent GUI opens on my machine in work, but is running at home. So anything I download will be saved at home. Cool eh?

Categories: Linux, VMware Tags:
  1. No comments yet.
  1. No trackbacks yet.