Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Script to use OpenNIC right now

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
vincezd
Posts: 1
Joined: 2013-11-29 22:44

Script to use OpenNIC right now

#1 Post by vincezd »

Hi all,
I'd like to share a super-awesome script of mine :) Its goal is to make it super easy to use an alternative DNS provider from the OpenNIC project.
The OpenNIC project is an alternative DNS provider. Users of the OpenNIC DNS servers are able to resolve all existing ICANN top-level domains (TLD) as well as their own (.geek, .ing, etc): 
http://www.opennicproject.org/

The script and its detailed README lives here: https://github.com/vindarel/open-nic

The script does the following:
- it retrieves which are the nearest OpenNIC DNS servers from your location thanks to the project's homepage (if their site isn't reachable it takes 2 servers by default)
- it appends them to the configuration file used by resolvconf (/etc/resolvconf/resolv.conf.d/tail) (a backup is made)
edit: => your surfing experience won't be affected, since OpenNIC will be the last choice.
- it runs resolvconf -u to update the configuration (you can see changes in /etc/resolv.conf)
- it tests wether we can access opennic's reserved domains.

You need those dependencies:

Code: Select all

sudo apt-get install resolvconf
sudo apt-get install python-pip && sudo pip install BeautifulSoup4
Here's the one-liner to download and run it:

Code: Select all

wget https://raw.github.com/vindarel/open-nic/master/opennic-set.py && sudo python opennic-set.py
You have a couple of options: --test and --undo to restore your backups.

I'd be happy to see how it's working on other machines and configurations: thanks in advance for the feedback.
It's working fine on my Debian (Mint Debian), but it doesn't on Ubuntu (I encountered what seems to be a known bug. I explain in the README).

I think what would be nice next is to offer the same with namecoins (https://dot-bit.org/Main_Page).
Any more ideas or remarks on the process are welcomed !

edit: appending a nameserver in the "tail" file (the default) won't have any consequence on your surfing experience. Your system will resolve all the usual sites with your default DNS. OpenNIC is the last choice, which will be useful in the case you wan't to access a reserved domain name.
In the case you want to use OpenNIC by default (for example, you don't want your internet service provider to know every single site you visit), you have to put a nameserver at the beginning of /etc/resolvconf/resolv.conf.d/head. Then, your surf will be a bit slower, but not that much, they're pretty good.

Post Reply