Zend certified PHP/Magento developer

systemd-resolved ignoring DNS set in NetworkManager

First of all I don’t know how systemd-resolved works, but here’s what I do know about my configuration:

I have a network profile “LAN-1” with a manual IPv4 config that uses 192.168.1.10 as DNS, this is the output of nmcli con show LAN-1:

[...]
IP4.ADDRESS[1]:                         192.168.1.200/24
IP4.GATEWAY:                            192.168.1.1
...
IP4.DNS[1]:                             192.168.0.10

Now, whenever I run resolvectl query foo.example.com it responds with something like:

foo.example.com: <some public ip>          -- link: enp39s0
                        (<another name>)

-- Information acquired via protocol DNS in 13.9ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: no
-- Data from: network

This is weird because 192.168.0.10 is my preferred DNS and it should consult that first. I know for a fact that the DNS is correctly configured since nslookup foo.example.com 192.168.0.10 returns the address I want.

Moreover, it seems that systemd-resolved does recognize the DNS I setup:

Link 2 (enp39s0)
    Current Scopes: DNS LLMNR/IPv4
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.0.10
       DNS Servers: 192.168.0.10
        DNS Domain: <domain>

But still seems to be ignoring it during queries