Slow DNS Requests under Ubuntu (or any Linux most likely) with WINS activatedTue 12 July 2011 by Javex
Quick Post here.
I moved to Linux (Ubuntu) on my desktop system because I wanted to see how it evolved and how it performs in daily production. I'm kinda split between awesome native ssh support and so many great features and the drawbacks of it being not so pretty and pretty time consuming while configuring.
I ran into a problem where my firefox took FOREVER to resolve DNS (and other browsers did, too). After clicking it the 2nd time, it worked like a charm. Windows worked fine, too.
All the solutions suggested it was ipv6 or sth. After trying forever I looked into nsswitch.conf. I don't know if it was my idea or if I got it somewhere else, but I thought it would be a good idea to put wins BEHIND dns contrary to what my previous guide on activating this stated. I use wins because I have a server running here which does not have a static IP and can be reached via media-server (simple samba).
So the solution in a nutshell:
open /etc/nsswitch.conf and care that the hosts line looks similar to this:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 wins
Look that WINS is BEHIND DNS. Then reboot (or reload the stuff that manages this part. Dunno, I just rebooted)