HTTP server courtesy of the lovely Apache Software Foundation |
1. Setting Up a WAMP/LAMP Server
The first step to getting our server up is to actually install the server. We're going to be using Apache, since it is the most popular free web server software out there. In order to let us use server side scripting, we're also going to install PHP. PHP is an easy to learn and powerful language that will be more than capable of providing the resources for powering our proxy.
Since we might as well do it now, I'm going to show you how to set up a WAMP (Windows, Apache, MySQL, PHP) server for Windows, or a LAMP (Linux, Apache, MySQL, PHP) server for Linux.
1. The first step is to download Apache. If you're on Ubuntu, you can get it out of the software repositories really easily.
apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
It's going to ask you a few questions for MySQL, like passwords and users. It's pretty straightforward, but just try not to lose any password information.
If you're on Windows, it's also pretty easy. Just download the installation files for Apache, MySQL, and PHP. Choose the binaries, unless you want to go through a whole lot of trouble for pretty much nothing. So just install the software, and it should ask you a few simple questions on preferences and passwords. Make sure you check "Install for all users" so that it will install as a service. For "network domain", just enter localhost.
2. Testing the LAMP/WAMP Server
Now we're going to test our server to make sure all portions of our LAMP/WAMP server are working.
On both Linux and Windows, you can just go to your browser and type "http://localhost" or "http://127.0.0.1" without the quotes as the address. The second is the loopback IP, which means "this computer" on every machine. Anyway, you should see a nice standard welcome page from Apache signaling that the web server portion is working. If it's not working, restart and check again. If it's still not working, try reinstalling, maybe something went wrong.
To test both the PHP and MySQL packages, we're going to make use of the phpinfo() function. Create a text document called index.php and add this to it:
<?php
phpinfo();
?>
Save this and place it in your root web directory. On Linux, it's /var/www/ and on Windows it's C:\Program Files\Apache Software Foundation\Apache2.2\htdocs by default.
Resart the Apache server on Windows by going to Start>Programs>Apache HTTP Server>Control Apache Server>Resart. On Linux, just run this in a terminal with root privileges:
service apache2 restart
Now go to your server (localhost or 127.0.0.1) in your browser and you should see a whole bunch of info. Search for "mysql" and make sure that it's enabled. If so, you're all set for the final step!
3. The Proxy
Now that we have the underlying server working, we just need to get the proxy up! To do this, we're going to use a premade PHP proxy script, PHProxy. You can download it from here.
Take the archive, and drop the files inside your root web directory, the same way we dropped index.php into it before. Make sure you delete the old index.php we made before adding the new files. Now, just restart your server and go to localhost in the browser. You should see something like this:
and boom goes the dynamite |
It's really cool that you have this working when you are at the computer running the server, but it's even cooler when you can access it from anywhere in the world! If you're behind a router, it's a bit more difficult, but it can be done thanks to port forwarding.
- Without a router:
- Get your IP by going to a site like whatismyip.com
- Take that IP, and just add "http://" in front of it. Just type that in the URL bar wherever you are, and you'll be looking at a nice, unblocked proxy!
- With a router:
- Check your local IP. Open up a terminal and type "ifconfig" on Linux or "ipconfig" on Windows. Your local IP will generally start with a 10.x.x.x or 192.x.x.x and end in a number from 2-255
- You need to access your router settings. This is different for each type of router, so I can't help you there. Generally, you can just go to the router's IP address, which is usually 10.x.x.1 if thats the form of your local IP, or 192.x.x.1. Replace the x's with the values from ifconfig or ipconfig.
- Once you have access to the settings, you need to forward Port 80 to your local IP. This is the IP the ifconfig or ipconfig you learned in the previous step. Save the settings.
- Now get your external IP by going to a site like whatismyip.com
- Take that IP, and just add "http://" in front of it. Just type that in the URL bar wherever you are, and you'll be looking at a nice, unblocked proxy!
That's it! Enjoy your unfiltered Internet wherever you may roam. If you have any questions, just post them in the comments and I'll get back to you as soon as possible.
You most likely won't even have access to this in school as ISPs purposely block port 80 to make sure you don't run a data center out of your house.
ReplyDeleteI've already tried this and it works. However, if you do run into that problem you can just select a different port to run Apache on, and just include that in the IP you're trying to connect to. So, say if you switch the port from the standard 80 to 333, you would just change it to "http://your-ip:333" in the URL bar on your browser.
ReplyDeletei used to just use remote desktop on the lowest settings since my school would block anything they thought was a proxy (regularly adding new sites to the list).
ReplyDeletejust use a low level account so if your password is sniffed,keylogged, the account has no powers but web browsing.
@Ryan Donahue you don't have to use port 80. Use 8080 or 1337. whatever you set it to.
Oh wow this is great
ReplyDeletethis has happened to me many times at my school and I already have wamp server installed so this will be extremely useful
Cool, i'll give this a go!
ReplyDeleteWell, a good choice is portable Tor as well. But Tor gives me a headache most of the time because many servers have "tor" somewhere in their hostname. Any way to avoid this?
ReplyDeletethanks for some cool tips actually I have no idea what tutorial I 'd like to have
ReplyDeleteWow thats a lot of work for a single proxy.
ReplyDeleteThis is great info, thanks KB!
ReplyDeleteit really helps with privacy on the internet.
Proxylicious. Good work.
ReplyDeleteThis is awesome, I could use this for my work. Risky though.
ReplyDeletehehe, I remember back in high school simply changing the port to view blocked sites, but this is pretty nifty as well.
ReplyDeleteawesome!
ReplyDeleteThis is great stuff man. THanks!
ReplyDeleteThanks for the positive feedback everyone! If anyone has any requests, just leave it as a comment for any of my posts.
ReplyDeleteI have a feeling your knowledge is way over my head! Ill stick to skiing and finger typing away on my blog...ok not quite finger typing. Your tutorials are very straightforward tho..keep em coming!
ReplyDeleteAwesome stuff man! By the way, check out my blog when you get the chance! http://fillintheblanksx.blogspot.com/
ReplyDeleteEven tho nothing at my school is blocked, I thank you for this information + followed
ReplyDeleteI should try this!
ReplyDeleteinteresting! I tried again with proxy and I didn't made it. this guide looks really good. I'll give it a go when I need it
ReplyDeletePretty damn sweet stuff!
ReplyDeleteWow, great stuff
ReplyDeletePretty impressive.
ReplyDelete