How do I change my DNS server globally without having to do it manually through network manager for every connection I have.
I want to use OpenDNS, whether its at home, university, wifi hotspot, phone tether…
I use Ubuntu 13.10 but I guess it will be the same on newer versions.
Best Answer
You can add this file so network manager will update
resolv.conf
each time a connection is established:(I would suggest the dns 85.214.20.141 (FoeBud))
Evaluation:
Then restart networkmanager in another console with
... watch changing the
resolv.conf
file.Drawback:
The local DNS caching on your machine by
dnsmasq
will not be available any more.I also tried:
which seemed somewhat cleaner or a shorter option would be:
But both options don't seem to work, because Network-Manager does start his own instance of
dnsmasq
which does not use those standard dnsmasq conf files.A solution to this would be to detach dnsmasq from NetworkManager and install dnsmasq on its own (see https://superuser.com/a/809716/160420) but I personally don't want to change so much on my default Ubuntu system.