systemd-resolved ignoring custom DNS servers after Ubuntu 24.04 upgrade
Jeffrey Walton
noloader at gmail.com
Thu Mar 5 22:11:13 UTC 2026
On Thu, Mar 5, 2026 at 4:00 AM Vahid Shaik <vahid at dnsrobot.net> wrote:
> Hi,
>
> After upgrading from 22.04 to 24.04, my custom DNS servers in
> /etc/systemd/resolved.conf keep getting overwritten by NetworkManager.
>
> I set:
>
> [Resolve]
> DNS=1.1.1.1 8.8.8.8
> FallbackDNS=9.9.9.9
>
You might need `DNSStubListener=yes`, too.
> Then ran systemctl restart systemd-resolved, but resolvectl status still
> shows my ISP's DNS servers. Looks like NetworkManager pushes its own DNS
> config and wins every time.
>
> I tried setting dns=none in /etc/NetworkManager/NetworkManager.conf but
> that broke DHCP entirely.
>
> What's the correct way to force custom DNS on 24.04 without fighting
> NetworkManager? I've seen people suggest netplan but my setup is a simple
> desktop install, not a server.
>
> To verify which DNS my machine is actually using, I ran a lookup through
> https://dnsrobot.net/dns-lookup and compared the response IPs against
> what 1.1.1.1 and my ISP's resolver return. Turns out my machine was still
> hitting the ISP DNS despite the resolved.conf change.
>
> Anyone else hit this after the 24.04 upgrade?
>
Please see <https://www.debian.org/doc/manuals/debian-reference/ch05.en.html>
and <https://wiki.debian.org/NetworkConfiguration>. I suspect they will
have nuggets of information for you.
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20260305/ec2bfc44/attachment.html>
More information about the ubuntu-users
mailing list