Configuring Ubuntu 17.04 Network Manager to use dnsmasq (Properly)

By default the Network Manager configuration in Ubuntu 17.04 is configured to use systemd-resolv to configure dns. This is fine until you want to use a vpn that requires “internal” dns servers to resolve, for example a work vpn (like mine) which has dns resolving hosts to internal addresses, where as you get external addresses when not on the host network. See this post on configuring that.


  1. Install dnsmasq-base
    >sudo apt-get install dnsmasq-base
  2. Change Network Manager configurations.
    1. /etc/NetworkManager/NetworkManager.conf add “dns=dnsmasq” in the “main” section.[main]



    2. /etc/systemd/resolved.conf add “DNS=” and “FallbackDNS=”, also set “Domains” if you need to for local network resolution.[Resolve]
  3. Reboot



Leave a Reply

Your email address will not be published. Required fields are marked *