Making .local DNS address lookups work on Ubuntu Dapper

I’ve got avahi installed on Ubuntu Dapper, so I assumed that that would make looking up foo.local address lookups work. Lots of sites say “add mdns to the hosts line in /etc/nsswitch.conf“, but it wasn’t working. What is needed is an “mdns plugin” for nsswitch.conf, which is nss-mdns. Installing this (it’s the libnss-mdns package in Ubuntu) made it all work; I can now ping foo.local and it works! Yay!

(not sure why it isn’t there by default…)

10 Responses to “Making .local DNS address lookups work on Ubuntu Dapper”

  1. Thats all well and good if you know what the h*ck Avahi is - may I suggest at least a link ? :-)

    http://avahi.org/

    Bald
  2. It’s not there by default due to the “no open ports” policy, which is also why avahi-daemon will be off by default. Apparently policy is more important than “works out of the box”.

    James
  3. I understand why “no open ports” wins, and I think it’s a good policy. libnss-mdns doesn’t open a port, though, as I understand it. Even so, avahi should probably depend on it.

    sil
  4. Ah, but it does open a port to listen for replies - so do dhcp and libnss-dns. https://lists.ubuntu.com/archives/ubuntu-devel/2006-July/019680.html is a decent summary of the situation, but read the whole thread for more detail.

    James
  5. avahi-daemon recommends it, and I had it automatically installed by aptitude, I just love this little boy :)

    Michele
  6. This is completely ridiculous. I find your blog documenting your “aha!” moment but you don’t give clear instructions for how to reproduce this. I installed mss-ndns and added it to the host line of /etc/nsswitch.conf and local name resolution doesn’t work. Is this how you did it? Please give more details.

    Dave
  7. Dave: that’s exactly what I did; added “mdns” to nsswitch.conf and installed nss-mdns. It then worked for me. Sorry if that’s not the case any more…

    sil
  8. Hi there!
    How can I set up (maybe under nsswitch.conf) user permissions for Mac computers to access my Linux distro?

    Thanks!

    Diogo
  9. I just wanted to comment that the content located here was not worth the 10 minutes it takes a dialup user to load your flash banner. Is that really necessary?

    I guess I shouldn’t complain, I just wanted to be heard.

    Thanks

    Chance
  10. Chance: which Flash banner? There’s no Flash here.

    sil

Leave a Reply