systemd-resolved doesn't play well with dnsmasq cname entries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I've set up my UniFi Security Gateway with dnsmasq so that I can resolve local hostnames on my network. I can resolve most hostnames, except for one: unifi.
$ nslookup unifi
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find unifi.lan: SERVFAIL
$ nslookup unifi.lan
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find unifi.lan: SERVFAIL
However, it works if I specifically query my router:
$ nslookup unifi 192.168.1.1
Server: 192.168.1.1
Address: 192.168.1.1#53
unifi.lan canonical name = unifi.
Name: unifi
Address: 192.168.1.6
$ nslookup unifi.lan 192.168.1.1
Server: 192.168.1.1
Address: 192.168.1.1#53
unifi.lan canonical name = unifi.
Name: unifi
Address: 192.168.1.6
So this seems specifically like a problem with systemd-resolved. Asking systemd-resolved to resolve these hosts is interesting:
$ systemd-resolve unifi unifi.lan
unifi: 192.168.1.6 -- link: wlp2s0
-- Information acquired via protocol DNS in 6.4ms.
-- Data is authenticated: no
unifi.lan: resolve call failed: No appropriate name servers or networks for name found
Following the steps [here](https:/
- unifi.lan error: https:/
- unifi success: https:/
And I found a setting in the router that seemed to be causing the problem. Removing that setting in my router resulted in this log:
- unifi.lan success after deleting option cname: https:/
But ultimately this seems like a bug in systemd-resolved since things seem to be working correctly if I take systemd-resolved out of the loop
$ lsb_release -rd
Description: Ubuntu 20.04.3 LTS
Release: 20.04
$ apt-cache policy systemd
systemd:
Installed: 245.4-4ubuntu3.13
Candidate: 245.4-4ubuntu3.13
Version table:
*** 245.4-4ubuntu3.13 500
500 http://
100 /var/lib/
245.
500 http://
245.4-4ubuntu3 500
500 http://
description: | updated |