How to use Pandora outside the US (with a VPN)
A while back, I posted a bit about how to use Pandora without a VPN and it worked sort of. From time to time, I’d also like to use other services like Hulu.com or whatever service thinks I am not american enough to use it. So I finally subscribes to BlackVPN. It gives you a US IP by providing a VPN connection that also has some kind of anonymization without plastering your face with ads like HotspotShield does, but it costs 5€/month. (If you want to sign up for BlackVPN, use my offer code TRSHNHG, it’ll give you 2 extra months free.)
So here was the problem again: I don’t want to send all my traffic over the VPN so I started searching and asking people on Twitter. My friends @Loredo and @wnetoa finally showed me how to properly set up static routes.
In essence what has to be done is to create a file (or modify it if it already exists) called ip-up in /etc/ppp
It’s contents need to be
#!/bin/sh
# pandora
/sbin/route add 208.85.40.0/21 -interface ppp0
This will install a new static route for every IP from 208.85.40.0 to 208.85.47.254 (that is roughly the iP range Pandora uses) over your VPN connection everytime you connect a VPN. Please also make sure the file is owned by root and chmod it to 0755.
That also means, whatever VPN connection you establish, this route will be set. You could add an if-statement to check if the correct gateway is selected but as the BlackVPN gateway changes all the time I just didn’t care. Furthermore routing this IP block through other VPNs wouldn’t matter as it would just not work as it does without the VPN.
Make sure that in OS X you a) use the built in VPN client and b) DON’T send all the traffic over VPN!
Why didn’t I do it for e.g. Hulu? Well, while finding out the IP range for the site might be easy, their data comes from akamai and this will most likely turn out to be a PITA. So I just created a second VPN connection in OS X that routes everything through BlackVPN.
This will most likely also work on Linux, and if you have Windows: do a format c: and install a proper OS like e.g. Ubuntu :)
