Many of us would like to do free spirit internet browsing while at office and working hard :-). However not all offices will allow you to do unrestricted internet traveling. Most of the day-to-day websites, email sites etc., will be on the restricted list. While some of the sites are restricted for security reasons, most of them are restricted for loss of productivity during office time.
Here is a way we can quickly bypass browsing restrictions and get to any site we want. This article assumes a fairly working knowledge on computers. In this article, we setup a browsing proxy service on the office system which will route all the internet traffic via a remote home system. Also the entire communication between office and home system is over a secure channel, so there is no worry of privacy concerns.
Our environment will have two systems:
(1) Local/Office System:
Windows operating system such as xp, 2000 etc.,.
Putty – Very useful telnet/ssh client for windows.
(2) Remote/Home System:
Preferably a linux operating system with SSH service started. If you don’t have a machine with linux system handy, you can use cygwin/openSSH on windows platform. In a nutshell this system should have a SSH server running on it.
If home system is directly connected to internet, then public IP address of the home system will be needed for this setup. To make life easier a free dynamic dns account for mapping the IP address to a URL can also be created. Check http://www.dyndns.org for details.
If home system is connected to internet via a router, then add a port forwarding on port 22 to the home system. Again public IP address or dynamic dns name of the router will be needed for this setup.
1) On the office system, open putty enter the ipaddress or dynamic dns name in the host name field. Select “SSH” as connection type. Port 22 will be selected which can be left alone unless you run the SSH service on a different port. Note: Though your putty screen might look a little different than the one seen here due to version differences, the basic steps would be still the same
In our example,
Host Name = demo123.dyndns.org
2) In putty, on the left-hand navigation panel, open SSH option and select “Tunnels”.
In the tunnels screen, set these values
Source Port: 3000 (this is the port at which our proxy service listens to, this port can be changed to any but preferably a number larger than 1024)
Destination Port: (Leave Blank)
Finally, select “Dynamic” from the radio button options.
3) Important: Click “Add” to add the tunnel settings to the connection.
4) On left-hand navigation panel, move the scrollbar to the top and click session. You will be seeing the settings entered in step(1). Now we can save the whole connection settings. Add a name for this connection in the saved sessions textbox and click save.
5) Click open, to open connection to home machine, and enter login and password information for the remote machine. This user need not be root user, but it needs to be an user with network access on the remote machine. That brings to the end of putty configuration. Now you have a proxy connection pipe from office machine to home machine. Now we need to configure our browser to use this pipe instead of the direct connection.
6) Open up a browser window and make the following changes to the connection settings.
Select connection settings from the menu item Tools -> Options. This will bring up the option window, Select “Advanced” from the icon and then switch to “Network” tab.
Click on Settings, which will bring up the network settings screen for the browser. Normally, the browser will be set for no proxy. If you have any other proxy settings remember to note those values. We might need to put that back when we are done using our own proxy service. Click on “Manual proxy configuration” option and enter “127.0.0.1” for SOCKS Host and 3000 (or the port you’ve used) for Port. Finally click “OK” to save the changes.
Select connection settings from the menu item Tools -> Internet Options. This will bring up the option window, switch to “Connections” tab. Click on “LAN Settings”. IE network settings window will open. In this window select “Use proxy server….” and click “Advanced”. In the proxy settings window, enter 127.0.0.1 as socks proxy host and 3000 as socks proxy port. Click “OK” and save the changes. Note: Make note of the existing LAN settings to put it back after using the proxy service.
7) Now we are ready for browsing any website through our home network and not through the office network. To verify this you can close look at the putty logs. Also another crude test will be to close the putty session to sure browser cannot connect to internet anymore. Once you are done using the proxy service revert back to your original browser network settings.