[Not Accepted] mDNS: if enabled then set nsswitch.conf to also use mDNS for host resolution

Problem/Justification
When mDNS is enabled, clients can use mDNS to reach TrueNAS but TrueNAS cannot use mDNS to access LAN resources. /etc/nsswitch.conf hosts entry does not include mDNS.

Impact
Cannot access LAN resources from TrueNAS using mDNS.

User Story
When mDNS is enabled, also reconfigure /etc/nsswitch.conf to enable mDNS resolution. This is a minimal mDNS configuration. I’m not sure there is a reason to not do this much automatically when mDNS is enabled, but it could be behind a tick box near DNS settings.

System has IPv6 configured on any interface:
hosts: files mdns_minimal [NOTFOUND=return] dns

System is IPv4 only:
hosts: files mdns4_minimal [NOTFOUND=return] dns

This allows mDNS to only resolve:

  • .local which is defined to be mDNS
  • link-local addresses like 169.254 and ff80::

Given TrueNAS is targeting primarily enterprises, this configuration will avoid security or policy concerns from allowing mDNS to resolve other domains/IP addresses. non-.local domains and non-link-local addresses are resolved by the enterprise DNS.

In a home environment it would be desirable to also allow fallback to mDNS via a tick box setting when mDNS is enabled (disabled by default):

System has IPv6 configured on any interface:
hosts: files mdns_minimal [NOTFOUND=return] dns mdns

System is IPv4 only:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

This will then also allow resolution of RFC1918 and public addresses e.g. assigned from ISP via DHCPv6 prefix delegation used in the local LAN if DNS fails.

Thank you for submitting this feature request. After keeping it open to gauge community interest, we’re closing it as it hasn’t received enough votes to prioritize for development.