0

I cannot add comments to question 1128536(How to make persistent changes to /etc/resolv.conf Ubuntu 18.10)

Using Ubuntu 20.04.3 on laptop ; latest update Oct 19th, after the one but last update oct 10th suddenly I had a problem resolving DNS. Before the update my /etc/resolv.conf read :

> nameserver 127.0.0.53

In my netmanager settings I had/have entered DHCP auto and DNS Manual with 2 DNS-Server IP adresses of my ISP : 1xx.2xx.xxx.21 1xx.2xx.xxx.22

the result of command $ ls -al /etc/resolv.conf

lrwxrwxrwx 1 root root 32 okt 13 14:10 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf

So to make sure I did

$ sudo rm -f /etc/resolv.conf

$ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

Only to find it didn't change anything : the content of new /etc/resolv.conf after restarting the systemd-resolve service still reads

nameserver ::1

I managed to complete the updates to the system by repeatedly saving manually an /etc/resolv.conf file and overwriting the file written by the systemd-resolve service (as a workaround) until the updates were successfully terminated. to make certain that people don't doubt my capacity to read : I DO understand the warning at the top of the file saying that the file is overwritten regularly.

I can manage to maintain a "usable connection" by regularly overwriting the file /run/systemd/resolve/resolv.conf, with following content

nameserver 1xx.2xx.xxx.21

nameserver 1xx.2xx.xxx.22

until i restart the systemd-resolve service and the file is overwritten by systemd=resolve and it reverts to

nameserver ::1

I also checked the /run/systemd/resolve/stub-resolv.conf file which has the following content

nameserver 127.0.0.53
options edns0 trust-ad

output of resolvectl status

Global
           LLMNR setting: no                   
           MulticastDNS setting: no                
           DNSOverTLS setting: no                  
           DNSSEC setting: no                  
           DNSSEC supported: no                  
           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 4 (ipv6leakintrf0)
       Current Scopes: 
       DNS DefaultRoute setting: yes
       LLMNR setting: yes 
       MulticastDNS setting: no    
       DNSOverTLS setting: no 
       DNSSEC setting: no 
       DNSSEC supported: no    
       Current DNS Server: ::1
          DNS Servers: ::1
           DNS Domain: ~. 
 
 Link 3 (wlp2s0)
       Current Scopes: none 
        DefaultRoute setting: no  
        LLMNR setting: yes  
        MulticastDNS setting: no     
        DNSOverTLS setting: no  
        DNSSEC setting: no  
        DNSSEC supported: no  
 
 Link 2 (enp6s0)
       Current Scopes: none 
       DefaultRoute setting: no  
       LMNR setting: yes  
       MulticastDNS setting: no     
       DNSOverTLS setting: no  
       DNSSEC setting: no  
       DNSSEC supported: no

My question is :

@heynnema : How do I make systemd-resolve produce a valid /run/systemd/resolve/resolv.conf, because it sure ignores the configuration entered in netmanager settings

0 Answers0