Sunday, July 29, 2012

Watch Olympics LIVE -- Roll your own FREE VPN

The Olympic fever is on. Except if you are in the good old U.S of A, you probably just have nausea hearing about the Epic Fail that is the Olympic coverage by NBC. As a cord cutter, I don't have any television service much less Comcast cable. And how can you watch such a global event like this that is all over social media tape delayed, I ask you ?

What follows is a step-by-step tutorial to signup for the free AWS (Amazon Web Services) account and run your own VPN in the Europe region (Ireland) and watch the olympics live from Eurovision Sports Online.

What you need:


  • New AWS account

  • SSH client - Available natively for Mac and Linux, Download Putty for Windows

  • PPTP VPN client - Available natively in Windows, Mac and Linux



Step-by-Step guide:


Launch an EC2 instance in EU West Region (Ireland):


  • Register for AWS (aws.amazon.com) using new credit card and get 1 year of free Micro instance. If you already have an account with Amazon AWS then you are out of luck.This is only for new accounts.

  • Login to AWS management console: https://console.aws.amazon.com/ and go to the EC2 Service

  • On the Left choose the Region - EU West (Ireland)

  • Now click on Launch Instance and choose the Classic Wizard and Continue

  • Choose Ubuntu Server 11.10 from the list and hit the Select button

  • Ensure that the Instance Type is Micro and hit Continue

  • Continue again for the Instance details. You can give it a name like VPN

  • For KeyPairs, Create and Download a new keypair. Keep this safe as you need to use this to login

  • Review and Launch Instance



Install VPN and Configure server


  • After the instance is up, Click on the Security Groups link in the left navigation and choose default Security Group

  • Choose Inbound tab and now add two new rules :

    • Choose SSH for choose a new rule and leave the source as 0.0.0.0 and choose Add Rule

    • Choose Custom TCP rule and set the port as 1723 and source as 0.0.0.0 and choose Add Rule



  • Now that the security group is setup, get the Public DNS: value for that instance from the AWS dashboard.

  • Also get the Public IP address and check if it is showing Ireland as the location in MaxMind's IP to Location database: http://www.maxmind.com/app/locate_demo_ip?ips=[IP address] . This is the database commonly used to deny access to people using their IP address. I had a few instances I brought up that come up as located in New Jersey. So if that happens, terminate the instance and create a new one with the steps above.

  • Use the SSH client of your choice and login to this Instance, you will need to use the keypair .pem file you downloaded above:
    ssh -i /path/to/keypair.pem ubuntu@ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com

  • Do the following to configure your instance:

    $ sudo su
    # aptitude install pptpd

    Add the following to /etc/pptpd.conf
    localip 172.16.0.1
    remoteip 172.16.0.2-100

    - Add ec2 dns server to /etc/ppp/pptpd-options and required 128-bit encryption
    ms-dns 172.16.0.23
    require-mppe-128

    - Add the following to /etc/ppp/chap-secrets . This username and password is what you will use to connect to your VPN
    [username] pptpd [password] *

    - Uncomment the following from /etc/sysctl.conf
    net.ipv4.ip_forward=1

    - Reload configuration
    # sudo sysctl -p

    - Add the following to /etc/rc.local and run it once:
    # sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    # sudo /sbin/iptables --insert FORWARD --protocol tcp --tcp-flags SYN,RST SYN --jump TCPMSS --clamp-mss-to-pmtu
    # sudo iptables -A FORWARD -p tcp --syn -s 172.16.0.0/24 -j TCPMSS --set-mss 1356
    - restart pptpd:
    # sudo /etc/init.d/pptpd restart




Connect to your VPN and enjoy Olympics LIVE


  • Create a new PPTP VPN in your VPN client and use your Public DNS of the VPN server you just created as the Gateway/Server Address.

  • Enter the username and password you chose above for the VPN and Choose Connect

  • After you are connected go to : http://www.google.com?q=ip and hit Search and it should you the VPNs IP address rather than your ISPs as your Public IP address

  • Now go to http://www.eurovisionsports.tv/london2012 and enjoy live Olympic coverage

1 comment:

  1. Bluehost is definitely the best hosting company for any hosting plans you need.

    ReplyDelete