On Thu, 2026-03-05 at 01:58 +0000, Vahid Shaik wrote:
> 1. Setting DNS= and FallbackDNS= in /etc/systemd/resolved.conf —
> works temporarily but reverts after reboot on one of my machines

You have to find out what "reverts" it & how (was that config
overwritten or ignored?).

And when systemd-resolved is managing resolv.conf, you have to make
sure nothing else is trying to do the same.

> 2. Symlinking /etc/resolv.conf to /run/systemd/resolve/resolv.conf —
> gives me the "upstream" servers but breaks .local resolution

Assuming by .local you mean Multicast DNS (mDNS), then systemd-resolved
can handle that or not, depending on the MulticastDNS setting in
/etc/systemd/resolve.conf (if disabled there, you'll need nss-mdns to
resolve .local names through mDNS). Of course, if your .local host
names are regular DNS entries in Pi-hole (not a good idea), then you'll
probably have to disable mDNS entirely.

> 3. Disabling systemd-resolved entirely — works but feels like
> fighting the system

> For those who've dealt with this — what's the recommended Debian way
> to handle custom DNS with systemd-resolved? Should I stick with
> resolved and configure it properly, or is disabling it and managing
> resolv.conf manually still a valid approach on Bookworm?

Both options should still work.

The systemd-resolved.service(8) manpage documents how systemd-resolved
interacts with /etc/resolv.conf, so that's the best place to start.

Also, whatever manages your network connection might be trying to set
custom DNS server for that connection, e.g. provided by DHCP or NM
static configuration or VPN setup. When using systemd-resolved, the
command 'resolvectl status' will show the global & per-link DNS servers
systemd-resolved is using.  Per-link (=connection) settings override
global ones.



-- 
Jan Claeys

(please don't CC me when replying to the list)

Reply via email to