For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > Stop DHCP from changing resolv.conf

Stop DHCP from changing resolv.conf

Created by dave. Last edited by dave, 13 years and 168 days ago. Viewed 2,854 times. #1
[edit] [rdf]
labels
attachments

Problem

When my Linux DHCP client gets a lease, it over-writes the /etc/resolv.conf (which I don't want for highly-specific reasons I won't share here).

Solution, Red Hat Family

In /etc/sysconfig/network-scripts/ifcfg-eth?, add:

PEERDNS=no

Solution, brute force method

Mark resolv.conf as immutable:

# chattr +i /etc/resolv.conf
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt