Open Amazon Web Services (AWS) Account

Go to the AWS Portal and sign up. Credit card will be required, but Amazon will not charge anything. Amazon will also ask for your phone number and verify it. Amazon EC2 offers free Micro Instances which are good enough for proxy server setup. They remain free for the first year of AWS usage.

Creating an EC2 Instance

Once you have the account login to AWS Management Console and from the EC2 Dashboard click the Launch Instance. Follow the steps and launch the instance of Ubuntu Server which is marked as Free tier eligible. Make sure you download SSH key file (.pem) as it will be needed to connect to server.

Free tier eligible Ubuntu Server

Install Tinyproxy

Tinyproxy is a small and fast HTTP/HTTPS proxy server daemon.

Connect to your instance using the key pair you downloaded during instance setup:

ssh -i ~/.ssh/mykeys.pem ubuntu@54.84.12.216

Install Tinyproxy

sudo apt-get install tinyproxy

Configure Tinyproxy

Start editing Tinyproxy config

sudo nano /etc/tinyproxy.conf

Comment out all Allow lines by adding # sign on each line so connections from all over are accepted. WARNING: anyone who finds this proxy will be able to use it. It is recommended that you shut down the server when it is not used.

#Allow 127.0.0.1
#Allow 192.168.0.0/16
#Allow 172.16.0.0/12
#Allow 10.0.0.0/8

Optional step: Set DisableViaHeader value to Yes of you want to make your proxy invisible.

DisableViaHeader Yes

Restart Tinyproxy service

sudo service tinyproxy restart

Open Port 8888 for Tinyproxy Server

In EC2 Management Console go to Security Groups and create a group that allows connections on ports 22 and 8888. Apply this group to proxy instance. Also, it is highly recommended to limit IPs of users by configuring Source settings. Proxies that are left wide open will be discovered by proxy scanners and used by random people. This can result in Amazon charges for network bandwidth.

Security Group rules

Final Words

This tutorial creates a powerful proxy which is open to public. It is highly recommended to use it for a limited time only and stop the instance when not in use. For continued use you should limit access to port 8888 only from your IP address through two mechanisms:

  • EC2 Security Group. Source setting.
  • Allow settings in the /etc/tinyproxy.conf file.