Let’s say that you need to resolve .local addresses from either another subnet or a VPN of some sort. Since mDNS uses multicast on a local LAN s

Propagating Bonjour/Rendezvous to Normal DNS

submited by
Style Pass
2025-08-07 07:00:04

Let’s say that you need to resolve .local addresses from either another subnet or a VPN of some sort. Since mDNS uses multicast on a local LAN segment, that won’t cross subnet boundaries and is generally impossible without workarounds most people don’t want to deal with (including me).

There are many ways to do this, but I’ve found that the simplest is to use plain DNS and set up a dedicated dnsmasq to resolve .local via standard DNS.

Tools like dig will complain a bit, but it works well enough for my needs since you can just point any resolvers that need this to a dedicated DNS server–and standard DNS will be routed through your router or VPN gateway, so it will work just fine.

And then set up a script to do the resolution inside the target subnet–I tried many approaches, but avahi-browse consistently failed to pick up on some of my machines and LXC containers without rhyme nor reason, so I decided to add a little list of machines I wanted it to forcefully resolve every time:

This isn’t overly clean (it doesn’t know anything about IPv6 and will let dead entries linger forever), but it works well enough for me, and adding a separate state file with “last seen” timestamps and clearing out old entries after a day or so is an exercise I leave to my readers.

Leave a Comment
Related Posts