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?