While Unlocator works as advertised, there is one issue: using the Unlocator DNS permanently is not a good idea for privacy/security reasons, speed and so on. For this reason, I've adapted the instructions for Tunlr I wrote a while back on WebUpd8, for Unlocator.

How to properly configure the Unlocator DNS under Linux

Again: you can simply change your DNS servers to those provided by Unlocator if all you want is to use the service and you don't care about your privacy/security - there's a simple howto on Unlocator's website.

The instructions below are for those who don't want to permanently use the Unlocator DNS.

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

The first method (A) has an advantage over the second one: the Unlocator DNS is only used for Netflix, Hulu, etc. while using the default DNS for other websites. There's a drawback too though: if Unlocator changes the DNS servers, you must edit the /etc/NetworkManager/dnsmasq.d/dnsmasq.conf and manually add the new DNS.

The second (B) method has the advantage of always setting the correct Unlocator DNS servers since it automatically retrieves them from the Unlocator 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.

Before continuing, you'll need to create an account (free while in beta) for Unlocator.

It's also important to note that if/when your IP changes, you need to login to your Unlocator account and click the "Update" button on your account settings page.

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

A. Configure Unlocator 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:

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 (but there is a limit to how many websites are supported so I suggest replacing existing websites instead).

You can find a list of Unlocator supported websites HERE. The IPs at the end of the "server=" lines are the Unlocator DNS servers. If accessing Hulu, Netflix, etc. stops working, make sure you check the Unlocator 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 Unlocator account page - under "DNS Setup for This Device " it should say: "Your DNS is setup correctly" 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".

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

Another way of easily switching the Unlocator DNS on/off is using a script included with the Tunlr AUR package created by edloaa, which I've modified to work with Unlocator

To be able to use it, make sure "wget" is installed - 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: