4

I'm trying to use the DNS over at /etc/systemd/resolved.conf in their capacity as DNS over TLS providers, but NetworkManager somehow manages to set ~. as search domain on the connections it sets up. That causes all the DNS queries to be funneled over the specific interface's DHCP-resolved DNS instead of the global DNS I configured:

Link 3 (wlo1)
      Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 mDNS/IPv4 mDNS/IPv6
DefaultRoute setting: yes
       LLMNR setting: yes
MulticastDNS setting: yes
  DNSOverTLS setting: opportunistic
      DNSSEC setting: allow-downgrade
    DNSSEC supported: yes
  Current DNS Server: 192.168.10.1
         DNS Servers: 192.168.10.1
          DNS Domain: ~.
                      lan

I find the lan domain useful for local devices, so I can't simply disable the per-link DNS settings outright, but I can't find anyway to make NetworkManager not set ~. there. It's not part of the resolv.conf modifications either:

[user@machine ~]$ cat /run/NetworkManager/resolv.conf 
# Generated by NetworkManager
search lan
nameserver 192.168.10.1

I need to make either NM not set any search domain except lan or make per-link configuration a fallback when global configurations doesn't work. Though the latter is probably quite unrealistic prospect.

2
  • I too am trying to figure out how to get rid of that ~. entry. As a workaround, you can set Domains=lan in /etc/systemd/resolved.conf, but there's a downside: it will search lan even when your wlo1 interface is down. Jan 12, 2021 at 0:13
  • It turns out that my problem was caused by /etc/resolv.conf pointing to the wrong file (/run/resolvconf/resolv.conf when it should be /run/systemd/resolve/stub-resolv.conf). Changing the symlink fixed it—no need to edit /etc/systemd/resolved.conf. Jan 12, 2021 at 1:44

1 Answer 1

0

I am not sure which version of NetworkManager implemented the change, but the problem has since been fixed with the current versions of NM.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .