Old DNS Settings Keeps Coming Back

The /etc/resolv.conf file is generated from the files stored in the /etc/resolvconf/resolv.conf.d directory when sudo resolvconf -u is ran.

If you make any changes to these files:

terrance@terrance-ubuntu:/etc/resolvconf/resolv.conf.d$ ls -l
total 8
-rw-r--r-- 1 root root   0 Jun  3  2015 base
-rw-r--r-- 1 root root 151 Feb 25  2017 head
-rw-r--r-- 1 root root  33 Jun  5  2016 original
-rw-r--r-- 1 root root   0 Jun  5  2016 tail

The changes will be reflected when you run the resolvconf -u command for update. I actually put my DNS information in the original file and I leave all the other files alone:

terrance@terrance-ubuntu:/etc/resolvconf/resolv.conf.d$ cat original 
search local
nameserver 10.0.0.1

Then after running the sudo resolvconf -u command we can see my changes in my /etc/resolv.conf file:

$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.0.0.1
search local

EDIT: One more thing you may have to check and change is the line dns=dnsmasq found in the /etc/NetworkManager/NetworkManager.conf file. You can copy and paste the following line to disable using the dnsmasq from the NetworkManager.

sudo sed -i 's/dns=dnsmasq/#dns=dnsmasq/' /etc/NetworkManager/NetworkManager.conf 

After running the above line, reboot the computer for the new changes to take effect.

Hope this helps!