0

On ubuntu 20.04, I have a dnsmasq processing running on one of my interface has ip 192.168.122.1. If I directly add nameserver 192.168.122.1 to the /etc/resolv.conf it works. If I use dig @192.168.122.1 mydomain.default it works too.

However, i modified the /etc/systemd/resolved.conf to add DNS=192.168.122.1 as mentioned in the manual. Then I restart the resolved and networkd:

$ sudo systemctl daemon-reload
$ sudo systemctl restart systemd-networkd
$ sudo systemctl restart systemd-resolved

the systemd-resolve status looks fine:

$ systemd-resolve --status
Global
       LLMNR setting: no                  
MulticastDNS setting: no                  
  DNSOverTLS setting: no                  
      DNSSEC setting: no                  
    DNSSEC supported: no                  
  Current DNS Server: 192.168.122.1       
         DNS Servers: 192.168.122.1       
          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

I also changed the hosts line in /etc/nsswitch.conf to

hosts:          files mdns4_minimal dns [NOTFOUND=return] mymachines

However, the dig and nslookup still does not work

$ nslookup mydomain.default
Server:         127.0.0.53
Address:        127.0.0.53#53

** server can't find mydomain.default: NXDOMAIN

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.