Yes, yes, and apparently no. Except…
Sorry about that. mDNS does not go through WireGuard tunnels by default because they do not allow multicast. I am loosely investigating it whenever I have some time. My rough trials brought me to:
- CLI:
ip link set dev wg0 multicast on
- Add
224.0.0.251/32, ff02::fb/128
in the AllowedIPs of your WireGuard peers. These are the multicast addresses. - Reinstall avahi (
sudo apt install avahi-utils
andsystemctl enable --now avahi-daemon
) - Tweak avahi configuration (
/etc/avahi/avahi-daemon.conf
) to allow point-to-point and reflector, and listwg0
in the enabled interfaces. - Restart
yunomdns
andavahi-daemon
services.
I would love a guinea pig to test it, since I am unsure how tweaked is my setup.
So far I can get .local domains published by the server, but not ones published by other peers.
Edit: oops I overlooked the “because I am a noob” part. I would totally be fine if you cannot try out these yourself. It’s good for me to have finally written it out so that other can investigate too.