Post

Disable Systemd DNS resolver

I ran into an issue recently where I tracked back that the systemd resolver was trying to be a tad to helpful and causing me pain through DNS. So I set out to kill and keep it disabled across reboots. In some quick googling I found a good answer on askubuntu.com.

Regurgitating what the answer is for my reference later and for anyone to find. (Along with a reference link below)

  1. Disable systemd-resolvd service:
    1
    2
    3
    
    sudo systemctl disable systemd-resolved.service
    sudo systemctl disable systemd-resolved-update-resolvconf.service
    sudo service systemd-resolved stop
    
  2. If file exists, add to “[main]” section in /etc/NetworkManager/NetworkManager.conf
    1
    
     dns=default
    
  3. Delete symlink and replace /etc/resolv.conf
  4. Restart network-manager
    1
    
     sudo service network-manager restart
    

This post is licensed under CC BY 4.0 by the author.