Problem/Justification
TrueNAS Discovery currently has no supported way to exclude an individual network interface from mDNS, NetBIOS, or WS-Discovery announcements.
On systems with multiple interfaces, truenas-discoveryd automatically includes every configured interface returned by interface.query in /etc/truenas-discovery/truenas-discoveryd.conf. This includes interfaces that are intentionally isolated from the primary LAN, such as:
- Dedicated point-to-point replication links
- Storage-only VLANs
- Backup networks
- VPN or tunnel interfaces
- Other limited-scope management networks
In my configuration, two TrueNAS systems are connected by a dedicated 10 GbE DAC link using a small point-to-point subnet. This link has no gateway, DNS service, or access to the general LAN. Once this interface is included in the discovery configuration, macOS clients intermittently fail to resolve or connect to the TrueNAS system through smb://lir.local or Finder Bonjour browsing.
The generated configuration is created by:
middlewared/etc_files/local/truenas-discovery/truenas-discoveryd.conf.py
The relevant logic appears to include every interface without filtering:
interfaces = render_ctx['interface.query']
iface_names = [i['name'] for i in interfaces]
if iface_names:
cp.set('discovery', 'interfaces', ', '.join(iface_names))
The current Service Announcement settings under Network → Global Configuration only allow mDNS, NetBIOS, and WS-Discovery to be enabled or disabled globally. There is no per-interface control and no supported allowlist or denylist.
Manually removing the point-to-point interface from truenas-discoveryd.conf and restarting truenas-discoveryd resolves the hostname-resolution problem. However, the configuration file is middleware-generated and is overwritten after a reboot or other configuration change, including SMB share changes.
The requested improvement is either:
- A per-interface setting to exclude an interface from service-discovery announcements, or
- A global interface allowlist or denylist for mDNS, NetBIOS, and WS-Discovery.
This would be similar to the interface-binding controls already available for services such as SMB and NFS.
Impact
This feature would benefit TrueNAS users who operate systems with multiple network interfaces serving different purposes.
Common examples include:
- Direct links between TrueNAS systems for replication
- Dedicated storage networks
- Backup-only interfaces
- Cluster or heartbeat networks
- Isolated VLANs
- WireGuard or other tunnel interfaces
- Separate management and client-access networks
Service-discovery announcements should normally be limited to interfaces where client discovery is expected. Advertising the system on every active interface can produce incorrect or ambiguous discovery behavior, especially when an interface has no route back to normal LAN clients.
A supported interface-selection mechanism would:
- Improve the reliability of SMB hostname resolution and network browsing
- Prevent service announcements from appearing on isolated networks
- Reduce unnecessary broadcast and multicast traffic
- Avoid unsupported manual edits to middleware-generated configuration files
- Eliminate the need for fragile startup scripts or configuration-repair jobs
- Give administrators better control over multihomed TrueNAS systems
The main disadvantage would be additional configuration complexity. This could be minimized by retaining the existing behavior as the default and making interface selection an optional advanced setting.
User Story
As a TrueNAS administrator with separate LAN and replication interfaces, I want to restrict mDNS, NetBIOS, and WS-Discovery announcements to my primary LAN interface so that client hostname resolution remains reliable and isolated networks are not used for service discovery.
A possible workflow would be:
- Open Network → Interfaces or Network → Global Configuration.
- Open the Service Announcement interface settings.
- Select which interfaces are allowed to advertise TrueNAS services, or exclude specific interfaces.
- Save the configuration.
- Middleware regenerates
truenas-discoveryd.confusing only the selected interfaces. truenas-discoverydreloads or restarts automatically.- The selection persists across reboots, SMB configuration changes, and other middleware configuration renders.
For example, an administrator could allow announcements on enp5s0, which is connected to the household LAN, while excluding enp6s0, which is a direct 10 GbE replication link to another TrueNAS system.