I'm running resolvconf
, dnsmasq
and interfaces&connections are managed by NetworkManager
(nm).
dnsmasq
is supposed to cache dns entries, and use upstream servers configured via DHCP and manually.
Problem is it seems dnsmasq ends up using upstreams configured only via nm
(using DHCP) - can't figure out how to add manually configured fallbacks (or primaries for that matter).
$ cat NetworkManager.conf
[main]
plugins=ifupdown,keyfile
rc-manager=resolvconf
# tried also this instead of 'rc-manager': dns=dnsmasq
[ifupdown]
managed=true
$ cat /run/dnsmasq/resolv.conf
nameserver ns-via-dhcp-1
nameserver ns-via-dhcp-2
nameserver ns-via-dhcp-3
nameserver ns-via-dhcp-4
nameserver 127.0.0.1
$ cat /run/NetworkManager/resolv.conf (think this isn't used anymore as resolvconf pkg is installed?)
# Generated by NetworkManager
search internal.company.domain.co.uk
nameserver ns-via-dhcp-1
nameserver ns-via-dhcp-2
nameserver ns-via-dhcp-3
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver ns-via-dhcp-4
$ cat /run/resolvconf/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 1.1.1.1
nameserver 127.0.0.1
search internal.company.domain.co.uk
$ cat /etc/resolvconf/resolv.conf.d/head
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 1.1.1.1
/etc/resolv.conf
links to /etc/resolvconf/run/resolv.conf
, whose contents are same as of /run/resolvconf/resolv.conf
.
Note 1.1.1.1
is the custom nameserver I'm trying to add, but seems like dnsmasq
is not using it. Looking up any domain now takes 2 sec every time, indicating nothing is cached.
dnsmasq
process w/ params:
/usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Also tried adding server=1.1.1.1
to dnsmasq config, but that didn't work either. Any suggestions?