systemd-resolved ignoring custom DNS servers after Ubuntu 24.04 upgrade

Colin Law clanlaw at gmail.com
Thu Mar 5 09:08:24 UTC 2026


On Thu, 5 Mar 2026 at 09:00, 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
>
> 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.

Does it work if you set it up in the network settings dialog? Or if
you want to use the command line then I think you can do it using
nmcli https://manpages.ubuntu.com/manpages/xenial/man1/nmcli.1.html

Colin L.



More information about the ubuntu-users mailing list