Your own “DNS server”

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 (8.8.8.8). 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.

Links

Videos now without flash

I bought the Vimeo plus membership for one year and added mobile versions to all videos so that iOS users should be able to watch them without the need for flash. Also if you have the latest YouTube5 Safari extension installed, you should be able to watch the videos with the html5 player.

Back to self-hosted blogging

After quitting this blog and saying goodbye to wordpress for a while I’m back. First I didn’t want to blog at all. Then I started an electronics blog on tumblr. Then I got very annoyed by tumblr. Now tumblr is down for more than 16h hours and I can’t stand it any longer. I was planning to write my own blog software but since this takes too much time than I can afford right now, I’ll use wordpress again. This will be only a temporary solution as wordpress is still very annoying itself (…but still less annoying than tumblr).

I found my old sql dumps but upgrading to the latest wordpress version and fixing all the encoding issues took two hours of my time. Luckily I found this post which solved the problem fast and easy.

Some things still need some adjustments like the theme and the search. Then the tumblr posts need to be migrated and I have to figure out the flattr setup for wordpress. Lets see how long that takes.

3x3x3 Cube with 2nd Board

The code can be found here.

3x3x3 LED Cube – Part #2

In the second post about the tiny 3x3x3 cube I want to present the second board which I made (actually my girlfriend made the first one). This board features a more advanced design than all the previous ones.

The main difference to the other boards is that this one uses shift registers to switch the LEDs on and off. This reduces the wires that are necessary to connect the board to the Arduino. There are only 6 wires needed, two for Vcc and GND and the other four for programming the shift registers. The board from part one needed 13 wires.

The design is based almost entirely on this tutorial from the Arduino website: http://www.arduino.cc/en/Tutorial/ShiftOut This is well explained that it doesn’t need any more words from my side. The big advantage of using shift registers is that no more wires are necessary even if more registers are added to address more LEDs. While this approach seems to be alright it has one drawback on my board. The shift registers I used can only source 70mA of current. I mentioned in the previous post that if all LEDs on one layer are on at the same time, they use up to 180mA. That is more than twice of what the shift register can deliver. That means that when an entire horizontal layer is on, the LEDs are a lot darker as each of them only gets 7,77mA.

Even though this board is more sophisticated it is still trivial to make, if you follow my posts about building the cube and the Arduino tutorial about using the shift registers. Still this is only one more step and these boards and cubes are almost one year old. I knew a lot less back then and you can see that. I wanted to write about them anyway, since they work in some way and help to explain certain concepts.

The next posts will be about my current efforts. New LEDs, new cubes, new chips etc. I even bought an FPGA board for building a large cube so there is a lot more in the pipeline here. I hope the next post will be on my new blog though. I had so many troubles with tumblr recently that I’m frustrated enough to move away from it. Temporarily I will host a wordpress blog myself. Later on I will write my own basic blog software as wordpress is just to bloated. Compared to tumblr, a self hosted wordpress is at least accessible and offers features which tumblr and other sites just don’t offer.

I’ll let you know when the new blog is ready. In the meantime I will post a video and the code for the cube … as tumblr is really annoying when you want embed videos in text posts *sigh*