.local (mDNS) Resolution on Debian/DevuanApplied to both minime and devuan.
Hosts on the LAN were reachable by their fully qualified router name (e.g. joe-macmini.home.local) but not by their Bonjour/mDNS name (joe-macmini.local), even though:
avahi-daemon was running and publishing this host's own name.tcpdump.Even getent hosts minime.local (this host's own advertised name) returned nothing — and tcpdump showed that no outbound mDNS query was ever sent. So the problem was in the NSS layer, not the network.
The home router (192.168.1.1) serves a home.local zone and, as a side effect, answers authoritatively for the top-level local label:
$ dig +short SOA local. @192.168.1.1 localhost. nobody.invalid. 1 3600 1200 604800 10800
The NSS module mdns4_minimal (from libnss-mdns) implements the Apple-recommended heuristic described in HT201275: if unicast DNS has an SOA for local., it assumes .local is a real unicast zone and silently disables itself. That is why no multicast query was ever emitted.
mdns4_minimal, mdns6_minimal, mdns_minimal) does not read /etc/mdns.allow under any circumstances — so a whitelist file alone will not override the SOA check. You must switch to the non-minimal module.
Two changes, as root:
cat > /etc/mdns.allow <<'EOF' .local. .local EOF
This tells the non-minimal mdns4 module to resolve .local via mDNS authoritatively, bypassing the unicast-SOA heuristic.
Change the hosts: line from:
hosts: files mdns4_minimal [NOTFOUND=return] dns
to:
hosts: files mdns4 [NOTFOUND=return] dns
Or as a one-liner:
sed -i 's/mdns4_minimal \[NOTFOUND=return\] dns/mdns4 [NOTFOUND=return] dns/' /etc/nsswitch.conf
No daemon restart is required — NSS is re-read per process. Open a new shell to test.
$ getent hosts minime.local 192.168.1.173 minime.local $ getent hosts joe-macmini.local 192.168.1.171 joe-macmini.local $ ping -c1 joe-macmini.local
mdns4 vs mdns4_minimalmdns4_minimal | mdns4 | |
|---|---|---|
Queries beyond .local | Never | Only if listed in /etc/mdns.allow |
Reads /etc/mdns.allow | No | Yes |
| Unicast-SOA heuristic | Always applied | Skipped for suffixes in /etc/mdns.allow |
| Risk of slow lookups for unrelated names | None | None, as long as /etc/mdns.allow only contains .local/.local. |
The cleanest fix is on the router: stop it answering for the bare local. zone so that dig SOA local. @router returns NXDOMAIN. That would restore mDNS for every client on the LAN without per-host changes. This was not done here because router configuration was out of scope for the troubleshooting session.
/usr/share/doc/libnss-mdns/README.md.gz — "Sites with a .local DNS zone"