How to prevent /etc/resolv.conf of being overwritten by dhcp

When you connecting and obtaining IP through dhcp, the file /etc/resolv.conf could be created.
If You want to have yours DNS servers, not this from your network/internet provider, you can:

1. write protect the file /etc/resolv.conf

# chattr +i /etc/resolv.conf

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.