Public bug reported:

See also https://community.ui.com/questions/USG-dnsmasq-cname-options-
not-playing-well-with-systemd-
resolved/11592045-d530-4f55-9cd2-9d45fc637e1d

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://wiki.ubuntu.com/DebuggingSystemd#systemd-
resolved_:_DNS_resolution_issues) I captured some systemd-resolved logs:

 - unifi.lan error: https://pastebin.com/pjzUvQfi
 - unifi success: https://pastebin.com/QN8hD9a1

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://pastebin.com/4csYdW5B

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://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
        100 /var/lib/dpkg/status
     245.4-4ubuntu3.11 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     245.4-4ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  See also https://community.ui.com/questions/USG-dnsmasq-cname-options-
  not-playing-well-with-systemd-
  resolved/11592045-d530-4f55-9cd2-9d45fc637e1d
  
  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://wiki.ubuntu.com/DebuggingSystemd#systemd-
  resolved_:_DNS_resolution_issues) I captured some systemd-resolved logs:
  
-  - unifi.lan error: https://pastebin.com/pjzUvQfi
-  - unifi success: https://pastebin.com/QN8hD9a1
+  - unifi.lan error: https://pastebin.com/pjzUvQfi
+  - unifi success: https://pastebin.com/QN8hD9a1
  
  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:
+  - unifi.lan success after deleting option cname:
  https://pastebin.com/4csYdW5B
  
  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://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
+         100 /var/lib/dpkg/status
+      245.4-4ubuntu3.11 500
+         500 http://security.ubuntu.com/ubuntu focal-security/main amd64 
Packages
+      245.4-4ubuntu3 500
+         500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1951701

Title:
  systemd-resolved doesn't play well with dnsmasq cname entries

Status in systemd package in Ubuntu:
  New

Bug description:
  See also https://community.ui.com/questions/USG-dnsmasq-cname-options-
  not-playing-well-with-systemd-
  resolved/11592045-d530-4f55-9cd2-9d45fc637e1d

  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://wiki.ubuntu.com/DebuggingSystemd#systemd-
  resolved_:_DNS_resolution_issues) I captured some systemd-resolved
  logs:

   - unifi.lan error: https://pastebin.com/pjzUvQfi
   - unifi success: https://pastebin.com/QN8hD9a1

  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://pastebin.com/4csYdW5B

  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://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
          100 /var/lib/dpkg/status
       245.4-4ubuntu3.11 500
          500 http://security.ubuntu.com/ubuntu focal-security/main amd64 
Packages
       245.4-4ubuntu3 500
          500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1951701/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to