DNS is one of the key ingredients of the internet and the world wide web. Without it you would have to type long numbers into the browsers address bar instead of convenient domain names like example.org. Humans seem to remember words better than numbers. In that sense, DNS is like the internets “phonebook”. To look up those numbers, which are the real address of (web)servers in the internet, every computer asks a so called name server to resolve a given domain name to its actual address.
But where do you get a name server address if you don’t have a name server yet? Well, most of the internet service providers just tell your computer to use their name server if you don’t have one already. Recently google announced their name server with a number which is quite easy to remember (126.96.36.199). So where ever you go you shouldn’t have to care about configuring a name server.
On the other side the name server provider can refuse to resolve certain addresses to an extend where it could be called »censorship«. A provided name server can be very slow and degrade your overall internet performance. Fun fact: Most of the times when people cry out “My internet is not working”, faulty or non-reachable name servers are involved.
Luckily DNS is very decentralized. Everyone can have its own name server. There is no magic to it and its very easy to do as well. Most users even have one pre-installed. Its called »bind«. Its quite easy to setup but there are other ones which are more convenient. I use »unbound« locally on my laptop. Where ever I go, I bring my name server with me. If something is not resolving or working, I have a log file to look into it. It allows me to block google tracking domains easily and offers speed and lots of flexibility. The best thing: It’s super easy to set up:
On Mac OS X with Macports run the following in your Terminal:
sudo port install unbound sudo launchctl load -w /Library/LaunchDaemons/org.macports.unbound.plist
Thats it. Test it in the terminal via:
dig www.slashdot.org @127.0.0.1
Now configure it in the Network Preferences as your DNS server and move on.
Packages for other operating systems should be available.
Why isn’t everybody using a local DNS resolver/cache?
Using public and well known DNS servers has a big advantage. Since all its users are contributing to its cache, 99% of the domains that need to get resolved are already in the cache. This saves time and bandwidth. As karsten pointed out in the comments, it wouldn’t be wise to switch completely to locally installed DNS resolvers. On the other side it has no disadvantages having a DNS resolver installed which is only running / used when you need it. Have a look at the comments for a more elaborate reply.
Instead of using GoogleDNS or OpenDNS only, look for other public DNS servers or set up one on your own for you and everybody else.
Even if you still don’t care to run your own name server, do yourself a favor and inform yourself about DNS. Its something, that doesn’t hurt to know and can be really useful.