Hi Andreas,
For 1.: for this the option "host-name=my-custom-name" can be used. The
domain name shouldn't be changed typically, I think, as mDNS requires
the "local" domain. Then the full advertised hostname for host address
records becomes "my-custom-name.local".
https://manpages.debian.org/trixie/avahi-daemon/avahi-daemon.conf.5.en.html
For 2.: not that I know of. The "publish-addresses" option is very
coarse and can be used to fully disable publishing all address records,
which makes your host's services effectively unreachable. The mDNS spec
allows a host to do this, to effectively claim the name on the link
without disclosing any addresses.
Publishing only link-local addresses doesn't seem to be an option. The
mDNS RFC 6763 is pretty strict on this:
When a Multicast DNS responder sends a Multicast DNS response message
containing its own address records, it MUST include all addresses
that are valid on the interface on which it is sending the message
So I think the best direction would be to *not* make this configurable:
it goes out of spec. Or else put a big warning in the config.
Related to link-local addresses there's an open issue with quite some
discussion and cross-references, because Avahi didn't seem to include
these in various cases:
https://github.com/avahi/avahi/issues/243
Most recent activity is a PR that proposes a config option for
link-local addresses:
https://github.com/avahi/avahi/pull/673
regards
Esko
On 19-9-2025 12:02, Andreas wrote:
I'm using avahi-daemon 0.8-16 that comes with Debian Trixie.
1. How can I prevent avahi-daemon from publishing a domain based on my
hostname? Currently e.g. if my host is named "myhost" it publishes a
dom1ain "myhost.local". I tried `publish-domain=no` but it doesn't
seem to have any effect.
2. Is there a way to restrict publishing to certain scopes of IPv6
addresses. I'd imagine it might be a good idea to only publish to
link-local addresses? I read the man page but didn't see such config,
except for `enable-wide-area=` which sounds related to my question.
--
*IoTconsultancy.nl* | Email/Teams: [email protected] | +31 6
2385 8339