Showing posts with label dns. Show all posts
Showing posts with label dns. Show all posts
Sunday, October 25, 2015
How To Set Up Unlocator DNS Under Linux To Access Netflix, Hulu, CBS, ABC, Pandora and More Outside The US
Tunlr, a free DNS service that allowed its users to access US-based on-demand Internet streaming providers from outside the US, was shut down recently.
For those who are looking for a reliable alternative, there's Unlocator, a similar service that you can use to watch Netflix, Hulu, CBS, MTV, PBS, ABC, Pandora and more no matter where you live.
For those who are looking for a reliable alternative, there's Unlocator, a similar service that you can use to watch Netflix, Hulu, CBS, MTV, PBS, ABC, Pandora and more no matter where you live.
The service is free to use while in beta (I'm not sure when it will be out of beta) and once it leaves the beta, it will cost $4.95 / month.
Update: Unlocator is out of beta and is no longer free to use. There's a 7-day free trial and after that, the service costs $4.95 per month / 27.50 for 6 months or $49.95 for a year.
Update: Unlocator is out of beta and is no longer free to use. There's a 7-day free trial and after that, the service costs $4.95 per month / 27.50 for 6 months or $49.95 for a year.
At the time I'm writing this article, Unlocator supports 78 services, including: Netflix, Hulu, Pandora, ABC, AMC, BBC, CBS, Channel4, Discovery Channel, ESPN, Fox, HBO Go, MTV, NBC, PBS, Showtime, TV.com, VEVO, USA Network, VH1 and others. A complete list can be found HERE.
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 failsdownloads, 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.
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.
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.dThen, create (edit) a file called "dnsmasq.conf" under /etc/NetworkManager/dnsmasq.d/. I'll use Gedit below:
gksu gedit /etc/NetworkManager/dnsmasq.d/dnsmasq.confAnd in the dnsmasq.conf file, paste the contents of THIS file.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-managerThen, 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 wgetAnd then download and install the script using the following commands:
cd /tmp
wget https://raw.github.com/hotice/unlocator/master/unlocator
sudo install /tmp/unlocator /usr/local/bin/Then, simply run the following command to use the Unlocator DNS:sudo unlocator startNext, restart your browser and visit the Unlocator account page - under "DNS Setup for This Device " it should say: "Your DNS is setup correctly".
To stop using the Unlocator DNS, use the command below:
sudo unlocator stopAnd restart your browser.Also see: Pipelight: Use Silverlight In Your Linux Browser To Watch Netflix, Maxdome Videos And More
Unlocator via +Antoni Norman (Pinguy)
Wednesday, October 14, 2015
Encrypt DNS Traffic In Ubuntu With DNSCrypt [Ubuntu PPA]
This article was posted a while back but I've decided to repost it because there's a new PPA that you can use to install dnscrypt-proxy in Ubuntu (14.10, 14.04 and 12.04) and also, some parts of the article needed to be updated.
DNSCrypt is a protocol for securing communications between a client and a DNS resolver, preventing spying, spoofing or man-in-the-middle attacks. To use it, you'll need a tool called dnscrypt-proxy, which "can be used directly as your local resolver or as a DNS forwarder, authenticating requests using the DNSCrypt protocol and passing them to an upstream server".
Thanks to Pascal Mons (work based on Sergey "Shnatsel" Davidoff's initial PPA, which doesn't have packages for Ubuntu 14.04 or 14.10 right now), you can easily install it Ubuntu. His packages use 127.0.0.2 as the local IP address so it doesn't interfere with Ubuntu's default setup. Also, for extra security, the packages use a dedicated system user, with no privileges - DNSCrypt will chroot to this user's home directory and drop root privileges for this user's uid as soon as possible.
The default DNSCrypt-enabled resolver used by Pascal's package is DNSCrypt.eu Resolver #1 @ The Hague, Holland, but this, along with other settings, can be changed by editing the /etc/default/dnscrypt-proxy configuration file (use "sudo service dnscrypt-proxy restart" after making changes to the configuration file). A list of public DNS resolvers supporting DNSCrypt can be found HERE (note that to get to the actual provider name, address and public key, you need to scroll to the right - annoying, I know).
According to Pascal, he didn't use the US based OpenDNS resolver, because it keeps logs of the websites you visit and it hijacks the homepage on all browsers, redirecting any URL bar search to its own servers in some cases, which does not happen with the DNSCrypt.eu servers.
According to Pascal, he didn't use the US based OpenDNS resolver, because it keeps logs of the websites you visit and it hijacks the homepage on all browsers, redirecting any URL bar search to its own servers in some cases, which does not happen with the DNSCrypt.eu servers.
If you want to add DNSCrypt support to your own public or private resolver, check out DNSCrypt-Wrapper, a server-side dnscrypt proxy that works with any name resolver.
Install DNSCrypt (dnscrypt-proxy) in Ubuntu / Linux Mint via PPA
1. To add Pascal's DNSCrypt PPA and install dnscrypt-proxy in Ubuntu, Linux Mint, elementary OS or other Ubuntu-based Linux distributions (including armhf), use the following commands:
sudo add-apt-repository ppa:anton+/dnscrypt
sudo apt-get update
sudo apt-get install dnscrypt-proxyNote: the PPA description provides information on how to check the authenticity of the code used for building the packages.
2. After installing DNSCrypt, you need to set your network connection DNS server to 127.0.0.2.
To do this in Unity, from the Network Manager indicator select Edit Connections, then select the connection and click Edit, switch to the IPv4 Settings tab and:
- if you're using Manual (static IP) as the "Method", enter "127.0.0.2" under "DNS servers" (and remember / note your original DNS server in case you want to go back to it), then click "Save":
- if you're using "Automatic (DHCP)" as the "Method", switch it to "Automatic (DHCP) addresses only" and enter "127.0.0.2" under "DNS servers", then click "Save":
3. And finally, restart your network connection (under Unity: select Network indicator > Enable Networking twice to disable and then re-enable it) and web browser.
You may want to check if the "127.0.0.2" DNS is actually in use (it needs to be the only DNS) - to do this in Unity, from the Network indicator select Connection Information.
Because the dnscrypt-proxy packages from Pascal's PPA don't use OpenDNS, you can't check to see if the DNS are used via the "dig txt debug.opendns.com" command or by visiting OpenDNS' test pages. However, you can check this by visiting https://dnsleaktest.com/ and running a DNS check - if you didn't change the default dnscrypt-proxy package resolver, it should display something like this:
Another way of checking if dnscrypt-proxy is working is by using the following command:
sudo tcpdump -i NETWORK-INTERFACE dst host 176.56.237.171... and then visiting some website in your web browser.(where NETWORK-INTERFACE is your active network interface like eth0, p5p1, etc. - you can find it using "ifconfig" -, and "176.56.237.171" is the default resolver used by Pascal's packages - if you've used a different one, change it in the command above with yours!)
The command output should look like this:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on p5p1, link-type EN10MB (Ethernet), capture size 262144 bytes
16:14:53.142488 IP ubuntu-desktop.local.57467 > resolver1.dnscrypt.eu.https: UDP, length 512
16:14:53.142514 IP ubuntu-desktop.local.57467 > resolver1.dnscrypt.eu.https: UDP, length 512
16:14:53.291372 IP ubuntu-desktop.local.57467 > resolver1.dnscrypt.eu.https: UDP, length 512
16:14:53.291450 IP ubuntu-desktop.local.57467 > resolver1.dnscrypt.eu.https: UDP, length 512
16:14:53.464624 IP ubuntu-desktop.local.57467 > resolver1.dnscrypt.eu.https: UDP, length 512
16:14:53.464641 IP ubuntu-desktop.local.57467 > resolver1.dnscrypt.eu.https: UDP, length 512
16:14:53.751950 IP ubuntu-desktop.local.57467 > resolver1.dnscrypt.eu.https: UDP, length 512
16:14:53.815789 IP ubuntu-desktop.local.57467 > resolver1.dnscrypt.eu.https: UDP, length 512Tip: DNSCrypt can be used with Unbound or dnsmasq (I didn't test it though) - for this and other tips, see THIS ArchWiki entry.
For more information on DNSCrypt / dnscrypt-proxy, check out the following links:
- https://github.com/jedisct1/dnscrypt-proxy
- http://dnscrypt.org/
- http://www.opendns.com/about/innovations/dnscrypt/
seen @ desdelinux.net, thanks to Pascal Mons for the PPA!
Subscribe to:
Posts (Atom)




