How to stop DHCP from changing Linux resolv.conf file.

Technical Q&A involving operating systems, networking, software, and hardware issues.

Moderator: jasonb

Post Reply
User avatar
jasonb
Site Administrator
Posts: 105
Joined: Tue Apr 22, 2003 1:54 pm
Location: Toronto, Canada
Contact:

How to stop DHCP from changing Linux resolv.conf file.

Post by jasonb »

If you're running Linux and don't want your ISP to automatically change the contents of your resolv.conf file every time you receive a new IP address via DHCP, then do the following.

Assuming that you're using eth0 for your external connection, add the directive "PEERDNS=no" to your /etc/sysconfig/network-scripts/ifcfg-eth0 file.
Post Reply