UPDATE: There was an error in one of the steps, the file /etc/ppp/options does not have to be edited, but /etc/ppp/pptpd-options does. The steps are now correct.
Like many Canadians I am jealous of the American’s and their ability to watch Hulu or listen to free music with Pandora. Both services claim they are working on making their site available to the world but I don’t like waiting.
The way these types of sites figure out that you are not an American is by your IP address. I don’t know of any way of using an American IP address on my computer at home but it just so happens I have several Cloud Servers that are located in the US which of course have American IP addresses.
I have heard of people outside the US using the Proxy server or VPN server method but I had no idea it was so easy to setup. If you already have a cloud server up and running you could literally have it working in about 5 minutes. Setting it up from scratch should take about 10 minutes.
Below are the steps I followed to setup a Ubuntu based VPN server that allows me to access these coveted American sites from either my Mac or PC.
I use Rackspace Cloud Servers for all my cloud server accounts but any VPS or dedicated server provider (provided they’re servers are located in the US) will work. I used Ubuntu 10.04 but any version of Ubuntu should work.
Connect to your server via SSH and start typing commands
If you just created a new Rackspace Cloud Server you’ll want to change your password.
Next update the package list and upgrade any packages that need updating.
Now install the PPTP server package.
apt-get install pptpd
Specify the local and remote IP addresses. Default should work unless your local network is 192.168.123.0
Add these lines (or uncomment and modify existing ones)
Create a user account to connect to your server
Add a user to the file in the following format:
username pptpd password *
john pptpd abc123 *
would create a user named john with a password abc123.
Now restart the pptpd service
You should be able to connect to your server via PPTP but you won’t be able to access any websites outside your server without a few more steps.
Setup DNS servers in the PPP Server options
Uncomment and change the 2 lines starting with ms-dns
This sets up your server to make DNS requests via OpenDNS
Open the system configuration file and setup IP forwarding
Uncomment the following line
To make the system configuration changes take effect:
Edit this file
Add these two lines above exit (0) in this file:
/sbin/iptables -t nat -A POSTROUTING -s 192.168.123.0/24 -o eth0 -j MASQUERADE
/sbin/iptables -I FORWARD -p tcp -syn -i ppp+ -j TCPMSS -set-mss 1356
Server is done. You can connect to this server using any PPTP client.