Run a local proxy server
I was so excited to write this article that I could not sleep well all night. Yesterday I have published an article that explains how you can setup a webserver on your computer and use it to display websites or share files with your friends. Today I'm going to show you how to use this web server to host a local proxy server that you can access from anywhere on the net to surf sites that are blocked at your current location.
The requirements are that the web server is up and running on your home computer and that the Apache module is started. Download one of the many proxy scripts and unzip it to a server directory.
I suggest you create a new sub directory in htdocs, don't name it proxy but use a name that does not tell anyone what the files in the directory can be used for.This is important as keyword filters may otherwise detect the proxy script based on the name and block you from accessing it. Name it tennis for instance or news.
Test the script by accessing it locally (http://localhost/tennis/) ; If the proxy script appears everything works out fine. Now test it using your remote IP. If the connection works as well, you can access it from any computer with an Internet connection as long as the server is running on your home computer.
Note that you need to know the public IP of your home computer to access the proxy, you can check it here for instance.
It is highly unlikely that this proxy will be banned by admins of your school, university or company because it runs on a dynamic IP and no one has ever used it before.
To secure the directory do the following: Create a .htaccess file - Windows Explorer does not like this kind of files but a good editor should be able to create the file without errors. Add the following lines to the file and save it.
Options All -Indexes
AuthName "Go Away ;)"
deny from all
allow from 184.108.40.206
This prevents access to the directory to anyone except the user with a matching IP address. This is not a useful protection if you want to prevent the admins from your school or university to take a look at your server, but it will block access for anyone esle.
A better protection would be to use a password protection, this is done the following way:
Create an encrypted password and copy the result in a file named randomly starting with a . - for instance .grqwev ; Place the file into the directory that you want to protect. Add a .htaccess file to the directory with the following lines.
AuthName "Top Secret"
That is it. You password protected your proxy script running on your local computer. Only users who know the password are able to login and use the proxy, everyone else will not be able to see what lies behind the password request.Advertisement