Loading

Wednesday, September 18, 2019

FREE (or VERY cheap) EC2 Proxy Server - Windows Over Ubuntu Proxy on AWS

Ever been sitting in a hotel (or your home) and tried to watch your favorite sports team on a streaming service, but couldn't due to the archaic and draconian broadcast licensing agreements which ban in-market online distribution?!? And the name brand hotel chain doesn't carry the local affiliate for your pennant-chasing team?!? WTF!?!

Or, you just wanted to connect to any website through an inexpensive (possibly even FREE!) proxy?

Not to worry! Within only a few minutes you too can start up an EC2 instance in any region of the world and route your browser though it (via PuTTY) to make the three letter league "think" you aren't in the home town market - don't worry, you'll still get all the streaming ads, and you're paying for the streaming service, so you aren't cheating the system completely, just flipping the bird at the old-school traditional broadcast monopoly!!!

Overview:
  • Launch Ubuntu 18.04 micro or nano instance in the region of your choosing.
  • Configure PuTTY and connect to instance - this is how you "proxy" through the EC2 instance.
  • Configure browser proxy settings to connect through a running PuTTY session, then surf the web!
First, you need an AWS account. If you don't have one yet, you can easily get one. And to boot, you get many services (including running this proxy server) free for up to one full year! And some services even beyond that.

Launch Proxy Instance
In the AWS Console select the EC2 service, then Launch Instance. I'm launching a micro (qualifies for free tier) Ubuntu 18.04 instance. If you'd like you can launch another version or distro. Also, the AMI ID will be different if you choose a different region, and it may be different if you launch some time after this post. The key is to just launch a current version.

Launch the instance into either the default VPN or a custom VPN in a public subnet - this instance needs to have a public IP address. You can choose either an existing security group, or create a new one - make sure to add TCP port 22 from your current location. For the key pair either use an existing one in your account to which you have access, or create a new one. You'll need this to SSH to the instance.

Make note of the instances IP address as you'll need it shortly...

SSH to EC2 Proxy Instance
If you don't already have PuTTY and PuTTYGen, or don't know how to convert the AWS-provided .pem file to a .ppk file (required for PuTTY then click here to get these apps, gen the .ppk file and configure PuTTY.

In addition to the previous connection information navigate to Connection, SSH, Tunnels and add "2100" in the Source port field, then click Add. Save the configuration, then connect to the instance.
Configure Browser Proxy Settings, then Browse the Web
Firefox
Go to Firefox settings, or enter "about:preferences#general" in the address field, scroll to the bottom and click on Settings under Network Settings. Select Manual proxy configuration and enter "localhost" in the SOCKS Host field, and port "2001" in the port field. Save the settings, then connect to the web.

Chrome (Works for IE and Edge too)
Select settings and search for "proxy," then go to the network settings.

Click on LAN Settings.

Select "Use a proxy....," then Advanced.

Enter "localhost" and port "2100" in the SOCKS section, then save your settings.

Verify Proxy is Working
Browse to speedtest.net or another service and verify that the IP address displayed matches the public IP address of the EC2 Proxy Instance. Notice how the "client" IP address matches that of the EC2 Proxy from above.

Make sure to leave the PuTTY session open as long as you are surfing the web, or watching your streaming event....

When you're done with the proxy just terminate it or shut it down. If you terminate the instance you may want to create an AMI from which you can quickly launch an instance in the future. Also, make sure to undo the proxy settings in your browser. Happy watching/browsing!

NOTE: This is an update to the kick-ass post, "How To Create Your Own Private Proxy Using Amazon EC2 and Putty on Windows" Thanks Nimrod!

No comments:

Post a Comment