I would like to add my own dns resolver to the dhcp provided one so that my local test setup with a bunch of virtual machines resolves fine. Note that my local resolver ONLY resolves locally (a certain subdomain) and not globally.
I know how I can replace the dhcp provided dns resolver by switching off automatic in NetworkManager. However, then I only get the resolvers I set by hand and no longer the dhcp provided one.
Instead, I would like to add my local resolver to the dhcp provided one. Any suggestions?
In nm-connection-editor, you can keep the “Automatic” setting and add additional DNS servers.
However, I have a problem with it: Example: “additional” 1.1.1.1 causes 1.1.1.1 to be used as nameserver and the DHCP one gets lost because of second in list.
I want domain “home” to use 192.168.2.254 and this seems to be not possible with systemd-resolved but implemented in dnsmasq.
Added: change nothing, but edit /etc/systemd/resolved.conf
DNS=youexternalnameserver
Domains=~yourprivatedomain
Resolvectl, dhcp dns = 192.168.2.254/home, added 1.1.1.1:
bridge0 connected to router:
Link 83 (bridge0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 mDNS/IPv4 mDNS/IPv6
Protocols: +DefaultRoute +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 1.1.1.1
DNS Servers: 1.1.1.1 192.168.2.254 fe80::b2ac:d2ff:fe57:410e
DNS Domain: home
1 Like
1 Like