how to stop resolv.conf from being updated

Mark admin at asarian-host.net
Fri May 30 15:13:39 PDT 2003


----- Original Message ----- 
From: "Laszlo Vagner" <george at vagner.com>
To: <questions at freebsd.org>
Sent: Friday, May 30, 2003 8:09 PM
Subject: how to stop resolv.conf from being updated


> I am using DHCP on a cable modem and my
> providers nameserver really sucks
> but changing my resolv.conf repairs
> the lookups for a little while then it gets
> set back to them upon bootup.
>
> how do i make it stay the way i set it.


Using brute force to prevent /etc/resolv.conf from being changed (with a
suggested chmod or chflags) is, imho, not the way. Play by the book, and put
something like this in /etc/resolv.conf:

prepend domain-name "my.nameserver.net ";
prepend domain-name-servers 194.0.0.1;
supersede domain-name "my.nameserver.net "

The trailing spaces ARE intentional. That worked like a charm for me, and
will "survive" a reboot. Substitute your own ISP, of course.

- Mark



More information about the freebsd-questions mailing list