0

I set a static IP and DNS through the netplan nameservers configuration. I set my LAN DNS and the cloudfare DNS in both IPV4 and IPV6 notation. As so:

network:
  version: 2
  renderer: networkd
  wifis:
    wlp3s0:
      dhcp4: no
      dhcp6: no
      addresses: [10.0.0.120/24]
      gateway4: 10.0.0.1
      nameservers:
        addresses: [10.0.0.110,1.1.1.1,1.0.0.1,"2606:4700:4700::1111","2606:4700:4700::1001"]
        search: [michigan]
     access-points:
        "*******":
          password: "*******"

Yet systemd resolve --status reports the DNS as :

   DNS Servers: 10.0.0.110
                  1.1.1.1
                  1.0.0.1
                  2606:4700:4700::1111
                  2606:4700:4700::1001
                  2001:nnnn:0:400b::12
                  2001:nnnn:0:400c::12

resolv.conf is linked as so:

ls -l /etc/resolv.conf
/etc/resolv.conf -> /run/systemd/resolve/resolv.conf

And resolv.conf content is :

nameserver 1.1.1.1
nameserver 1.0.0.1
# Too many DNS servers configured, the following entries may be ignored.
nameserver 2606:4700:4700::1111
nameserver 2606:4700:4700::1001
nameserver 2001:nnnn:0:400b::12
nameserver 2001:nnnn:0:400c::12
search michigan

dnsmasq ?

 # dpkg -l *dnsmasq* 
 Desired=Unknown/Install/Remove/Purge/Hold
 | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
 |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
 ||/ Name             Version       Architecture Description
 +++-================-=============-============-============================================
 un  dnsmasq          <none>        <none>       (no description available)
 ii  dnsmasq-base     2.80-1ubuntu1 amd64        Small caching DNS proxy and DHCP/TFTP server
 un  dnsmasq-base-lua <none>        <none>       (no description available)

I don't want my ISP's DNS involved at all. Does this mean that my ISP DNS will be logging my requests anyway? Perhaps not, perhaps we use only the first DNS to respond but I don't know that. And I would like to understand what's going on.

I can set a firewall rule to deny the ISP DNS and all seems well enough, but is there any issue I should be thinking of there?

  • You'll get the ISP's DNS servers from the dhcp request. You may be able to set DNS= in the /etc/systemd/resolved.conf... but I don't know if that will eliminate the ISP's DNS. And DNS requests are made in parallel, not first in the list, so any DNS server could answer. You may need to use VPN. Report back. – heynnema May 10 at 13:54
  • @heynnema I've updated the question to include my netplan configuration. It is for static IP, sets dhcp to no. What effect does that have? – Stephen Boston May 10 at 14:54
  • Are you using server or desktop Ubuntu? If desktop, why are you using netplan (esp to connect to a wireless network)? – heynnema May 10 at 14:58
  • @heyenna Desktop. I prefer netplan. I am not particularly mobile and find configuration to new networks simple enough. Would network-manager get around this DNS issue? If so then how does it do it? – Stephen Boston May 10 at 15:00
  • 1
    It's @heynnema :-) And... nobody prefers netplan in a desktop environment, esp if the machine is portable, or is used to connect to various wired/wireless networks. There are three different symlinks for /etc/resolv.conf, and one may work better/different than the other. Show me ls -al /etc/resolv.conf and cat /etc/resolv.conf and the DNS= entry I mentioned earlier. – heynnema May 10 at 15:03

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.