My /etc/resolv.conf
shows
# Generated by NetworkManager
search [value provided by local network]
nameserver 127.0.1.1
The nameserver
value is not the one provided by the local network (checked using nm-applet), but the search
is.
I've removed dns=dnsmasqd
from /etc/NetworkManager/NetworkManager.conf
. There's only dnsmasq-base
installed.
I don't want to set DNS permanently because I still want resolv.conf
to be updated by the VPN, so
no prepend domain-name servers
in /etc/dhcp/dhclient.conf
no dns-nameservers
in /etc/network/interfaces
no /etc/resolvconf/resolv.conf.d/
base
head
tail
files.
resolv.conf
remains the same when I set the DNS on nm-applet using Automatic (DHCP)
.
When I set Automatic (DHCP) addresses only
, there is no search
value, but nameserver 127.0.1.1
is still in resolv.conf
.
Edit: Did some more checking.
/etc/NetworkManager/dnsmasq.d
is empty.
$ cat /usr/lib/NetworkManager/conf.d/10-dns-resolved.conf
[main]
dns=systemd-resolved
/etc/systemd/resolved.conf
is all commented out.
$ systemd-resolve --status
Global
DNS Servers: 127.0.1.1
DNS Domain: [same as resolv.conf]
How do I configure that the DNS values from nm-applet overrides the systemd-resolve
?.
Ultimately, what I want is to initially set the dns in resolv.conf
to my preferred server, and then when I connect to VPN (nm-applet's OpenVPN), resolv.conf
will have the value provided by the VPN.