Hi, I am having some issues setting the DNS in NetworkManger GUI and CLI tool.
First I tried configuring a wireguard connection, this worked seemingly ok until I saw the wrong DNS occasionally being used. This behavior is inconsistent and difficult to reproduce consistently. The behaviour is the same when restarting the service and or when rebooting the system. So for a sanity check i disabled the wireguard connection and only used my default connection. In NetworkManager’s GUI I configured ipv4 and ipv6 method to Automatic (addresses only) and set the DNS config manually. I left the other fields at default or blank. Then I checked which DNS my lookups were routed to, and they went to my ISP DNS, not the addresses I configured manually.
resolv.conf and no-stub-resolv.conf in /run/NetworkManager is being set correctly with only the DNS configured from the GUI.
In /etc/NetworkManager/system-connections I can see that the connection config for this connection have the ipv4 and ipv6 ignore-auto-dns flag set to true. And the DNS for ipv4 and ipv6 are the addresses I specified.
nmcli shows the default connection as active, there is also an active loopback (I do not know what this does or the purpose of it).
dnsmasq and systemd-resolved is installed. systemctl shows these two services as inactive. Which is the default behaviour for EndevourOS (?).
I assume this is user error. How do I configure this correctly? And when using a wireguard connection, how can I guarantee that all network traffic is routed through this connection, using the DNS set specifically by this connection’s config?