This command can be helpful, when set to use Public Google DNS on your computer.
If your ISP assigned you DNS, it will request every time your computer boots.
chattr - change file attributes on a Linux file system
The operator `+' causes the selected attributes to be added to the existing attributes of the files; `-' causes them to be removed; and `=' causes them to be the only attributes that the files have.
immutable (i)
A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
So you can block your /etc/resolv.conf file as root user.
chattr +i /etc/resolv.conf
unlock
chattr -i /etc/resolv.conf
More information on chattr man page.
No hay comentarios:
Publicar un comentario