Accessing American Media Streaming Services Abroad

There are several popular media streaming services that are only accessible in the United States- Pandora, Hulu, Spotify, and a great deal of Netflix content. This media is basically barred due to copyright issues, so, those of us who enjoy consuming american content but don’t live there are inherently out of luck. Were not totally out of luck though – there are several ways to circumvent this issue.

Please note that I am not entirely sure the legality of doing this, so please consider the information as theoretical only.

There are many paid services available, including proxy services, and VPN solutions, as well as free ones like Tunlr and other ad supported tunnels and proxies. While Tunlr works for the most part, the ad supported proxies are annoying and usually limit your usage wither based on time or by bandwidth cap. On the other hand, the cheapest VPN connection for this purpose will probably run you $5 or $10 dollars a month. What I am suggesting here is to create your own VPN server on a U.S. located Virtual Private Server (VPS). This can be done for less than $2 a month and has the following benefits:

  • Public Static IP Address(es)
  • Many Gigabytes of Hard Drive Space
  • Ability to Host Websites
  • CPU power
  • Synchronous Bandwidth (Same upload and download speed)
  • Your Favorite Linux Distribution with Root Access
  • Pretty much anything else you can do on a Linux machine!

If this sounds like a fun project to you, I’d recommend looking at the latest VPS offerings. For this to work you will need some form of VPN support on the kernel – this comes in the way of PPP/TUN/TAP ‘modules’. You could ask the prospective provider if this is enabled or available. most of the time it is, out of the box. Other times you may have to request for it to be enabled. Regardless, the next thing too look at is the specs of the VPS including RAM, Disk space, CPU power, and more importantly, BANDWIDTH. It is nice to have an unmetered connection but they come at a higher price. Realistically consider how much data you will be transferring per month and double it (VPN needs to upload the data to you as well); maybe you don’t need unmetered. The connection speed and ping times are quite important too. See if the connection is dedicated or shared (dedicated is preferable but again, costs more), and make sure to ping their servers so you can see how ‘responsive’ they are. As for the other specs, if VPN is the only service you will be setting up on your server, 128MB RAM, 5GB Hard drive, and a single processing core should be more than enough.

Once you take the plunge, which can be an intimidating decision for  some reason. You should have your VPS set up within a few hours and given the root password or console access through a web interface. From here you need to set up your VPN server. PPTP is by far the easiest to configure. There are some really easy scripts that will allow you to set up the server in an instant.

Here is one of the best for OpenVZ Virtual Machines:

 

#!/bin/bash
# Interactive PoPToP install script on a OpenVZ VPS
# Tested on Debian 5, 6, and Ubuntu 11.04
# 2011 v1.1
# Author: Commander Waffles
# http://www.putdispenserhere.com/pptp-debian-ubuntu-openvz-setup-script/

echo "######################################################"
echo "Interactive PoPToP Install Script for OpenVZ VPS"
echo "by Commander Waffles http://www.putdispenserhere.com"
echo "Should work on various deb-based Linux distos."
echo "Tested on Debian 5, 6, and Ubuntu 11.04"
echo
echo "Make sure to message your provider and have them enable"
echo "IPtables and ppp modules prior to setting up PoPToP."
echo
echo "You need to set up the server before creating more users."
echo "A separate user is required per connection or machine."
echo "######################################################"
echo
echo
echo "######################################################"
echo "Select on option:"
echo "1) Set up new PoPToP server AND create one user"
echo "2) Create additional users"
echo "######################################################"
read x
if test $x -eq 1; then
echo "Enter username that you want to create (eg. client1 or john):"
read u
echo "Specify password that you want the server to use:"
read p

# get the VPS IP
ip=`ifconfig venet0:0 | grep 'inet addr' | awk {'print $2'} | sed s/.*://`

echo
echo "######################################################"
echo "Downloading and Installing PoPToP"
echo "######################################################"
apt-get update
apt-get install pptpd

echo
echo "######################################################"
echo "Creating Server Config"
echo "######################################################"
cat > /etc/ppp/pptpd-options <<END
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
ms-dns 8.8.8.8
ms-dns 8.8.4.4
proxyarp
nodefaultroute
lock
nobsdcomp
END

# setting up pptpd.conf
echo "option /etc/ppp/pptpd-options" > /etc/pptpd.conf
echo "logwtmp" >> /etc/pptpd.conf
echo "localip $ip" >> /etc/pptpd.conf
echo "remoteip 10.1.0.1-100" >> /etc/pptpd.conf

# adding new user
echo "$u * $p *" >> /etc/ppp/chap-secrets

echo
echo "######################################################"
echo "Forwarding IPv4 and Enabling it on boot"
echo "######################################################"
cat >> /etc/sysctl.conf <<END
net.ipv4.ip_forward=1
END
sysctl -p

echo
echo "######################################################"
echo "Updating IPtables Routing and Enabling it on boot"
echo "######################################################"
iptables -t nat -A POSTROUTING -j SNAT --to $ip
# saves iptables routing rules and enables them on-boot
iptables-save > /etc/iptables.conf

cat > /etc/network/if-pre-up.d/iptables <<END
#!/bin/sh
iptables-restore < /etc/iptables.conf
END

chmod +x /etc/network/if-pre-up.d/iptables
cat >> /etc/ppp/ip-up <<END
ifconfig ppp0 mtu 1400
END

echo
echo "######################################################"
echo "Restarting PoPToP"
echo "######################################################"
/etc/init.d/pptpd restart

echo
echo "######################################################"
echo "Server setup complete!"
echo "Connect to your VPS at $ip with these credentials:"
echo "Username:$u ##### Password: $p"
echo "######################################################"

# runs this if option 2 is selected
elif test $x -eq 2; then
echo "Enter username that you want to create (eg. client1 or john):"
read u
echo "Specify password that you want the server to use:"
read p

# get the VPS IP
ip=`ifconfig venet0:0 | grep 'inet addr' | awk {'print $2'} | sed s/.*://`

# adding new user
echo "$u * $p *" >> /etc/ppp/chap-secrets

echo
echo "######################################################"
echo "Addtional user added!"
echo "Connect to your VPS at $ip with these credentials:"
echo "Username:$u ##### Password: $p"
echo "######################################################"

else
echo "Invalid selection, quitting."
exit
fi

 

If you'd like to share this, click below:

Leave a Reply

Your email address will not be published. Required fields are marked *