1

How do you configure Avahi on Ubuntu to automatically broadcast and discover the DNS info for each Linux server on a local network?

I've ran this on my localhost (hostname mylocalhost) and a test server (hostname mytestserver), but all hostname lookups still fail:

$ sudo apt-get install avahi-daemon
$ sudo nano /etc/avahi/avahi-daemon.conf
    -#host-name=foo
    +host-name=<hostname>
    -#publish-addresses=yes
    +publish-addresses=yes
$ sudo service avahi-daemon restart
$ sudo update-rc.d avahi-daemon defaults
$ avahi-daemon --check
$ host mytestserver
Host mytestserver not found: 3(NXDOMAIN)
$ host mytestserver.local
Host mytestserver.local not found: 3(NXDOMAIN)
$ ping mytestserver
ping: unknown host mytestserver
$ ping mytestserver.local
ping: unknown host mytestserver.local

I've confirmed my firewall is disabled, so that shouldn't be blocking it. I've also read through Ubuntu's wiki page on Zeroconf and mDNS, but it didn't help.

What am I doing wrong?

  • In my experience Avahi is not very reliable, and it's worth the hour or so it takes to set up a real domain (e.g. with FreeIPA). – Michael Hampton Nov 30 '14 at 1:41

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.