Thursday, October 20, 2011

Accessing Blocked Websites – Use your own proxy server at home!

7:34 PM
I will look at setting up a Http proxy server on a Windows XP machine. Please note that this article won’t be covering the case when you use proxy server or WiFi at home. I will be writing another post about such scenarios later.
Step 1 – Download and install Perl distribution
Download Windows x86 version of Active Perl from ActiveState site. Install with default configuration except the directory which I recommend to be set to “C:\usr\”.
Step 2 – Download and install Apache server
Download latest Apache server for Windows (2.2.3 as of today) from http://httpd.apache.org/. Install it under any folder with port 80 as the HTTP port . Setting port to 80 is important since most corporates only allow port 80 access. If you get any error in binding to port 80, probably you have something else listening on it.
Step 3 – Configure Apache server
Now we need to configure Apache to enable CGI.
Locate #AddHandler cgi-script .cgi in httpd.conf (located inside apache subfolder conf) and remove the hash(#) in front.
Locate the “you set DocumentRoot to” string in httpd.conf. Under that you will see Option directive. Change it to Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
Step 4 – Download and install CGIProxy (nph-proxy)
Download CGIProxy (nph-proxy) from http://www.jmarshall.com/tools/cgiproxy/nph-proxy.cgi.txt. Rename the file to nph-proxy.cgi and copy it to Apache’s document root (htdocs). Now change the first line in nph-proxy.cgi to #!C:\usr\perl\bin\perl.exe
Start Apache from the bin folder (httpd.exe). Now open a browser session and point to http://localhost/nph-proxy.cgi.

Find the IP address of your home connection. This can be viewed by typing ipconfig on the command prompt. Now from the office machine access http://IP ADDRESS/. You should see the proxy form which we saw above. Happy orkutting!
Note : This will need more steps if you have a WIFI network at home (port forwarding). I will cover these issues in the next post.

0 comments: