I'm trying to modify NetworkManager's default DNS settings so that whenever I add a new connection it uses instead of the default DNS for that connection. I still would like to be able to modify the DNS for each individual connections afterwards however.

I set up DNSCrypt recently, and it worked great on most networks. However, some networks that I use require that I use their DNS server instead of DNSCrypt, meaning that I cannot simply set the default nameserver on resolv.conf to I found that NetworkManager/nmcli still did a good job of using DNSCrypt when I changed some of the networks to use However, it would be very nice if each new connection had this config by default:



In my research I found this in the NetworkConfig.conf manpage:

Specify default values for connections.



However, there are only a few supported properties, and trying this did not work:


I was wondering if there were any know workarounds to this issue, either using NetworkManager or something different.

  • Have you ever found a solution to this? – Teresa e Junior Sep 30 '17 at 20:48
  • 1
    Unfortunately no, I ended up switching to systemd-networkd, but I have yet to implement dnscrypt – marceloneil Sep 30 '17 at 20:54
  • 1
    I researched based on your comment and, since NetworkManager now uses systemd-networkd (at least on Ubuntu 17.04), the only thing I had to was create the /etc/systemd/network/ files and restart both services. I continue using NetworkManager and systemd takes care of the DNS (tested with systemd-resolve --status). – Teresa e Junior Sep 30 '17 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.