by the way things are not going well at all, it's not even a friend, but you should see it well before you leave, thus applying "chattr + i" files to the system, I think we should look for a solution to the problem that sometimes be something so simple that is in our face and we can not fill because we are nervous wanting to impose our will on the system, sometimes a little script even works miracles when well executed in the network, but apparently you do not want this and by the way is not or is studying to be a systems administrator, sorry! But if you'd rather get nervous and perform these nonsense tricks of this kind on the system okay after all, it's not on my system, sorry to leave it you angry at that! Instead of doing this! to use the 'chattr' command configure, edit the 'interfaces' file, which is usually in the /etc/network/ folder and add/change the dns-nameserver options with the nameserver ip you want. if these options are not in the file you can add them as small examples:
-Sample: just edit the "/etc/network/interfaces" file.
auto lo
iface lo inet loopback
iface lo inet6 loopback
iface eth0 inet static
dns-nameserver 192.168.1.1 <= Your IP address here.
dns-nameserver 8.8.8.8
dns-nameserver 8.8.4.4
-Save the file and reboot the network ...
In your case you just want to set the IP address of the servers, set only the following to the end of the interfaces file.
dns-nameserver 8.8.4.4
dns-nameserver 8.8.8.8
Here is an example/sample that is used here.
auto lo
iface lo inet loopback
iface lo inet6 loopback
iface eth0 inet static
address 192.168.1.4/24
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameserver 192.168.1.4
dns-nameserver 8.8.4.4
dns-nameserver 8.8.8.8
Here's just a small sample, so you better understand how the system creates your resvol.conf file with each boot.
If you just want to set the addresses of your DNS servers in the revsolv.conf file just set the dns-nameserver in the rest you can leave it as it is, do not need to change, just set the "dns-nameserver" and save, boot and you will see that from now on your file resolv.conf will always come with the dns-nameserver that you have defined in this file.
chattr +i /etc/resolv.conf
), and then look for distraught shouting in the system logs. – DopeGhoti Mar 16 '18 at 23:01/etc/resolv.conf
is supposed to be a symlink to/var/run/resolv.conf
Does/var/run/resolv.conf
exist when you boot? – saleetzo Mar 16 '18 at 23:06