Ubuntu DNS Resolver

Has some issues with my laptop recently not being able to resolve DNS requests for the local network.

I run a DNS server (tied to my DHCP service) on a pfSense router, and my Windows box would pick up the DNS resolver address from DHCP fine. Ubuntu, however, ignored it 😦

I looked in the usual /etc/resolv.conf – but found that it was populated by the newer systemd-resolve program.

You can view the resolvers that systemd will use with the following command:

me@machine:~$ systemd-resolve --status

Which gives…

Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test

It was missing my ‘internal’ DNS domain, and the address of the DNS server itself.

A quick tweak to /etc/systemd/resolved.conf:

[Resolve]
DNS=192.168.1.1
#FallbackDNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
Domains=mydomain
#LLMNR=yes
#DNSSEC=no
#Cache=yes
#DNSStubListener=udp

Then a restart of systemd:

service systemd-resolved restart

And voila! It works!

Advertisements