Ubuntu / Linux news and application reviews.

tunlr logo

Tunlr is a free DNS service that lets you use U.S.-based on-demand Internet streaming providers, such as Netflix, Hulu, CBS, MTV, ABC, Pandora and more, if you're living outside the U.S.

At the time I'm writing this article, Tunlr reports that the following streaming services are working:
  • US video streaming services: Netflix, Hulu, CBS, ABC, MTV, theWB, CW TV, Crackle, NBC, Fox, A&E TV, TV.com, Vevo, History, Logo TV, Crunchyroll, DramaFever, Discovery, Spike and VH1;
  • US audio streaming services: Pandora, Last.fm, IheartRadio, Rdio, MOG, Songza;
  • Non-US streaming services: BBC iPlayer (excluding live streams), iTV Player, NHL Gamecenter Live and TF1 Replay / WAT.tv (excluding "direct" stream).

In my test, Tunlr has worked as advertised, but there's one issue: using Tunlr DNS permanently is not a good idea: for privacy/security reasons, speed and so on. Even the Tunlr FAQ page says you shouldn't use the Tunlr DNS for every day web surfing. On Windows, there are some tools you can use to quickly switch the Tunlr DNS on/off, but there's no such tool for Linux, so here's how to properly use Tunlr under Linux.


Configure Tunlr DNS under Linux


Before proceeding, please note that Tunlr recommends using Firefox and also, Google Chrome is not supported!

Below you'll find two ways of setting up the Tunlr DNS under Linux.

The first one (A) has an advantage over the one (script) below: the Tunlr DNS is only used for Netflix, Hulu, etc. while using the default DNS for other websites. There's a drawback too though: if Tunlr changes the DNS servers, you must edit the /etc/NetworkManager/dnsmasq.d/dnsmasq.conf and manually add the new DNS. Update: I've added a script at the bottom of method A for automatically retrieving and updating the Tunlr DNS (thanks to Jochen Blacha!).

The second (B) method has the advantage of always setting the correct Tunlr DNS servers since it automatically retrieves them from the Tunlr website (the DNS servers have changed quite a few times already). The disadvantage is that when switching Tunlr on using this script, all the traffic passes through the Tunlr DNS and not only the websites that need it, like it's done using the first method. But you can do this: only browse the websites you wouldn't normally have access to when switching the Tunlr DNS on and when you want to visit some other websites, switch the Tunlr DNS off.

With these in mind, use the configuration method that suits you best.


A. Configure Tunlr DNS using Dnsmasq / Network Manager

In Ubuntu 12.04+, Network Manager uses dnsmasq by default so the instructions below are specific to Ubuntu users. For other Linux distributions, you can simply paste the code below (the two lines containing "server="...) in /etc/dnsmasq.conf and restart Dnsmasq. I only tested it in Ubuntu though.

Let's proceed. Firstly, create the /etc/NetworkManager/dnsmasq.d folder (I believe it's not created by default in Ubuntu 12.04 for instance):
sudo mkdir -p /etc/NetworkManager/dnsmasq.d

Then, create (edit) a file called "dnsmasq.conf" under /etc/NetworkManager/dnsmasq.d/. I'll use Gedit below:
gksu gedit /etc/NetworkManager/dnsmasq.d/dnsmasq.conf

And in this file, paste this:
domain-needed
all-servers
cache-size=5000
strict-order

server=/tunlr.net/netflix.com/hulu.com/pandora.com/cbs.com/bbc.co.uk/abc.go.com/mtv.com/go.com/abc.com/tv.com/pbs.com/vevo.com/fwmrm.net/thewb.com/cwtv.com/crackle.com/mog.com/iheart.com/mylifetime.com/doubleclick.net/rubiconproject.com/cpxinteractive.com/adnxs.com/brightcove.com/cpxadroit.com/atdmt.com/mtv.com/mtvnservices.com/imrworldwide.com/demdex.net/fox.com/foxfdm.com/eurovisionsports.tv/netflix.ne/nflximg.com/nflxext.com/chartbeat.com/nbc.com/history.com/discovery.com/vh1.com/itv.com/aetv.com/foxadhd.com/cbsstatic.com/cbsi.com/theplatform.com/akamaihd.net/pbs.org/sharethis.com/revsci.net/scrippsnetworks.com/scrippscontroller.com/imrworldwide.com/scorecardresearch.com/quantserve.com/liverail.com/elogua.com/inskinmedia.com/ip2location.com/rubiconproject.com/southparkstudios.com/conviva.com/liverail.com/local.yahooapis.com/msnbc.com/nbcuni.com/rdio.com/recaptcha.net/69.197.169.9
server=/tunlr.net/netflix.com/hulu.com/pandora.com/cbs.com/bbc.co.uk/abc.go.com/mtv.com/go.com/abc.com/tv.com/pbs.com/vevo.com/fwmrm.net/thewb.com/cwtv.com/crackle.com/mog.com/iheart.com/mylifetime.com/doubleclick.net/rubiconproject.com/cpxinteractive.com/adnxs.com/brightcove.com/cpxadroit.com/atdmt.com/mtv.com/mtvnservices.com/imrworldwide.com/demdex.net/fox.com/foxfdm.com/eurovisionsports.tv/netflix.ne/nflximg.com/nflxext.com/chartbeat.com/nbc.com/history.com/discovery.com/vh1.com/itv.com/aetv.com/foxadhd.com/cbsstatic.com/cbsi.com/theplatform.com/akamaihd.net/pbs.org/sharethis.com/revsci.net/scrippsnetworks.com/scrippscontroller.com/imrworldwide.com/scorecardresearch.com/quantserve.com/liverail.com/elogua.com/inskinmedia.com/ip2location.com/rubiconproject.com/southparkstudios.com/conviva.com/liverail.com/local.yahooapis.com/msnbc.com/nbcuni.com/rdio.com/recaptcha.net/192.95.16.109

Some of the websites under the "server" lines above have been added to avoid the geofencing used by some websites. You can edit the "server" lines above to add more websites. You can find a list of Tunlr supported websites HERE. The IPs at the end of the "server=" lines are the Tunlr DNS servers. If accessing Hulu, Netflix, etc. stops working, make sure you check the Tunlr website for updated DNS.

When you're done, save the file, then run the following command to restart Network Manager:
sudo restart network-manager

Then, restart your browser and visit the Tunlr status page - under "Tunlr activation check" it should say: "Tunlr DNS address is set. Tunlr is activated!" like in the screenshot below:



If it doesn't work, firstly try to restart your computer. If it still doesn't work (some users are reporting issues with dnsmasq and private names), try editing /etc/NetworkManager/NetworkManager.conf and commenting out (put "#" in front of the line) "dns=dnsmasq".

Update: to automatically retrieve and update the Tunlr DNS in case it changes (it changes quite often), use THIS script.


B. Quickly switch the Tunlr DNS on/off using a script

Another way of easily switching the Tunlr DNS on/off is using a script included with the Tunlr AUR package created by edloaa.

If you're using Arch Linux, install wget - Ubuntu users can install it using the following command (may already be installed):
sudo apt-get install wget

And then download and install the script using the following commands:
sudo apt-get install wget
cd /tmp
wget https://aur.archlinux.org/packages/tu/tunlr/tunlr.tar.gz
tar -xvf /tmp/tunlr.tar.gz
sudo install /tmp/tunlr/tunlr /usr/local/bin/
Then, simply run the following command to use the Tunlr DNS:
sudo tunlr start
Next, restart your browser and visit the Tunlr status page - under "Tunlr activation check" it should say: "Tunlr DNS address is set. Tunlr is activated!".

To stop using the Tunlr DNS, use the command below:
sudo tunlr stop
And restart your browser.