Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 12505  / 2 Years ago, mon, february 21, 2022, 10:58:55

I have manually edited /etc/resolvconf/base to add openDNS name servers, and then run sudo resolvconf -u to update the /etc/resolv.conffile.



However changes are discarded on each reboot.



How do I preserve those changes?



$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial


edit:



/home/pkaramol
$ cat /etc/resolvconf/resolv.conf.d/base
nameserver 208.67.222.222
nameserver 208.67.220.220
/home/pkaramol
$ sudo resolvconf -u
/home/pkaramol
$ 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 127.0.1.1

More From » dns

 Answers
0

You are placing the changes you want into the wrong directory. NetManager allows custom configuration of the file by editing the base, head and tail by placing your preferences in this directory:



/etc/resolvconf/resolv.conf.d/head
/etc/resolvconf/resolv.conf.d/base
/etc/resolvconf/resolv.conf.d/tail


You can correct this by moving your /etc/resolvconf/base to /etc/resolvconf/resolv.conf.d/base.



The content you're seeing after reboot is the content of the /etc/resolvconf/resolv.conf.d/head file. It takes precedence over all and as you can see, is preserved.



The priority choices should be placed there.


[#9230] Monday, February 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
laiuct

Total Points: 44
Total Questions: 105
Total Answers: 107

Location: Seychelles
Member since Mon, Feb 15, 2021
3 Years ago
;