Thursday, May 29, 2008

Help I can't ping FQDN's in Ubuntu!!!!

Okay, for this tip I need to specify that I have only ever encountered the problem on Ubuntu 7.10 (Gutsy Gibbon). However, from what I read while researching the problem it also applies to Ubuntu 8.04 (Hardy Heron). Basically, what happened was I could ping my mail server by its name (rex), but not its Fully Qualified Domain Name (rex.cms.local).

Turns out there is some strange interaction between DNS and Avahi (no not the woolly lemur the Linux implementation of Zeroconf) that only rears its ugly head when your local domain ends in a .local. Now, I hear that Avahi is great if you have a network of computers, no DNS server and no desire to set one up, but I don't have that problem. I have a DNS server dang it!! Two of them to be precise. All I want is nice easy DNS resolution!!

Well here is your solution:
  • Open /etc/nsswitch.conf in your favorite text editor (I like nano, vim works, if you are an emacs user.......well I guess you can keep reading).
  • find the following line:
    hosts: file mdns4_minimal [NOTFOUND=return] dns mdns4
  • Change it to:
    hosts: files dns
  • Thats it!!
Once again, it will break Avahi, but most likely you wont need it.

2 comments:

aa said...

Thanks a lot for your useful post. I am using Ubuntu 9.10 and after one whole day of debugging, was finally able to resolve this issue after following the instructions in your post.

Anonymous said...

Thanks a lot, you have saved my day!