Linux Ubuntu Mint how to check nameservers when /etc/resolv.conf disabled solution

You'll notice that /etc/resolv.conf contains dire warners on most Linux Desktops. 


# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53

 

This is because of systemd-resolved, which is a local, internal DNS resolver service that handles all of the DNS requests.  It warns you not to make changes since they will just be overwritten and defaulted back to the local resolver running on 127.0.0.52 as we can see with the line for "nameserver 127.0.0.53"

We can see that indeed systemd-resolved is running on 127.0.0.53

Output of netstat

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      1773/systemd-resolv
udp        0      0 127.0.0.53:53           0.0.0.0:*                           1773/systemd-resolv

 

You can check the current nameservers with this command:

systemd-resolve --status

Global
       LLMNR setting: no                  
MulticastDNS setting: no                  
  DNSOverTLS setting: no                  
      DNSSEC setting: no                  
    DNSSEC supported: no                  
  Current DNS Server: 172.76.5.2     
         DNS Servers:
172.76.5.2
                      172.76.5.3     
          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                

Link 13 (veth8325f72)
      Current Scopes: none
DefaultRoute setting: no  
       LLMNR setting: yes
MulticastDNS setting: no  
  DNSOverTLS setting: no  
      DNSSEC setting: no  
    DNSSEC supported: no  

Link 11 (veth9a73ce5)
      Current Scopes: none
DefaultRoute setting: no  
       LLMNR setting: yes
MulticastDNS setting: no  
  DNSOverTLS setting: no  
      DNSSEC setting: no  
    DNSSEC supported: no  

How can we get rid of systemd-resolved?

In fact this is required if want to run our own bind or DNSMasq server for various reasons including running your own local routing/DNS: https://realtechtalk.com/Virtualbox_Best_Networking_Mode_In_LabWork_Environment_without_using_NAT_Network_or_Bridged-2475-articles

 

systemctl disable systemd-resolved

#remember to stop it too!

systemctl stop systemd-resolved

Remember to actually add a "nameserver" entry in /etc/resolv.conf or your DNS won't work.


Tags:

linux, ubuntu, mint, nameservers, etc, resolv, conf, disabled, solutionyou, ll, contains, dire, warners, desktops, systemd, resolved, edit, dynamic, connecting, dns, stub, resolver, lists, configured, domains, quot, resolvectl, uplink, servers, currently, programs, symlink, static, supported, modes, nameserver, handles, requests, warns, overwritten, defaulted, output, netstat, tcp, udp, resolve, global, llmnr, multicastdns, dnsovertls, dnssec, server, nta, addr, arpa, corp, ip, intranet, lan, veth, scopes, defaultroute, ce, bind, dnsmasq, various, routing, https, realtechtalk, virtualbox_best_networking_mode_in_labwork_environment_without_using_nat_network_or_bridged, articles, systemctl, disable,

Latest Articles

  • python mysql install error: /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found mysql_config --version
  • FreePBX 17 How To Add a Trunk
  • Docker Container Onboot Policy - How to make sure a container is always running
  • FreePBX 17 How To Add Phones / Extensions and Register
  • Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. solution
  • Cisco How To Use a Third Party SIP Phone (eg. Avaya, 3CX)
  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX 17 in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide