Disabling DNSMASQ via Network Manager on Ubuntu 16.04+

Last Updated on

If you are unable to resolve local dns names from an Ubuntu machine hosting a bind DNS server – it is likely that dnsmasq is running on port 53.  As far as i can tell, it gets in the way and causes more issues than the purported benefits.  On Ubuntu 16.04+ (I tested this on Ubuntu 19.04) you can disable dnsmasq as follows:

    1. Edit 
      1
      /etc/NetworkManager/NetworkManager.conf

      and after 

      1
      [Main]

       add or change to 

      1
      dns=none

      . Save the file.

    2. Execute 
      1
      systemctl restart NetworkManager.service

      (note uppercase and lowercase).

    3. Edit 
      1
      /etc/resolv.conf

       with your values. Save the file.

1
2
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved

 

Optional testing: reboot and confirm.

 

Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply