If systemd-resolved is installed and running, you completely lose control of /etc/resolv.conf -- editing /etc/resolv.conf is not effectual at all. Basically if you want to run your own DNS service, you need to *stop* systemd-resolved:
sudo systemctl stop systemd-resolved sudo systemctl disable systemd-resolved # Be careful with this: only say yes, if it does not remove other *needed* # packages. sudo apt purge systemd-resolved At Thu, 5 Mar 2026 02:47:26 +0000 Vahid Shaik <[email protected]> wrote: > > Hi all, > > After upgrading from Bullseye to Bookworm, I'm running into an issue where > systemd-resolved seems to override my custom DNS settings in /etc/resolv.conf. > > I have a small home server running Debian 12 with Pi-hole for local DNS > filtering. Before the upgrade, I had this in /etc/resolv.conf: > > nameserver 192.168.1.10 > nameserver 1.1.1.1 > > After the upgrade, systemd-resolved took over and /etc/resolv.conf now points > to 127.0.0.53. My Pi-hole queries stopped working. > > What I've tried so far: > > 1. Setting DNS= and FallbackDNS= in /etc/systemd/resolved.conf ÃÂ works > temporarily but reverts after reboot on one of my machines > 2. Symlinking /etc/resolv.conf to /run/systemd/resolve/resolv.conf ÃÂ gives > me the "upstream" servers but breaks .local resolution > 3. Disabling systemd-resolved entirely ÃÂ works but feels like fighting the > system > > I've been using https://dnsrobot.net/dns-lookup to verify which nameservers > are actually responding to my queries from outside, which helped confirm the > issue is local to resolved and not my upstream DNS. > > 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? > > Thanks, > Vahid <https://aka.ms/GetOutlookForMac> > > -- Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364 Deepwoods Software -- Custom Software Services http://www.deepsoft.com/ -- Linux Administration Services [email protected] -- Webhosting Services

