From: Jim on
One of my network interfaces (dc0) takes its IP from an ADSL router via
DHCP. For reasons I'd rather not go into it has to do this - it can't
simply be a fixed IP.

The problem is that the router is passing on incorrect values for DHCP
and seems to be overwriting /etc/resolv.conf

Is there a way of getting the DHCP client to not do this? Something in
/etc/dhclient.conf perhaps?

Jim
--
Twitter:@GreyAreaUK

"If you have enough book space, I don't want to talk to you."
Terry Pratchett
From: Johan van Selst on
Once upon a newsgroup, Jim claimed:
> One of my network interfaces (dc0) takes its IP from an ADSL router via
> DHCP. For reasons I'd rather not go into it has to do this - it can't
> simply be a fixed IP.
>
> The problem is that the router is passing on incorrect values for DHCP
> and seems to be overwriting /etc/resolv.conf

Fix the router settings? Then it will work for all clients.

> Is there a way of getting the DHCP client to not do this? Something in
> /etc/dhclient.conf perhaps?

Yes, you can specify 'prepend domain-name-servers 1.2.3.4;' or even
use supersede instead of prepend - see the manual for details.

Another option is to make /etc/resolv.conf not-writable (chmod u-r)
or even system immutable (chflags schg).


Ciao,
Johan
--
Why do we always come here - I guess we'll never know.
It's like a kind of torture to have to watch the show.
From: Jim on
On 2010-07-09, Johan van Selst <{c.u.b.f.m.}@news.gletsjer.org> wrote:
> Once upon a newsgroup, Jim claimed:
>> One of my network interfaces (dc0) takes its IP from an ADSL router via
>> DHCP. For reasons I'd rather not go into it has to do this - it can't
>> simply be a fixed IP.
>>
>> The problem is that the router is passing on incorrect values for DHCP
>> and seems to be overwriting /etc/resolv.conf
>
> Fix the router settings? Then it will work for all clients.

I wish I could but it's got a list of DHCP servers from -somewhere- and
it won't let be alter them. Perishing thing.

>> Is there a way of getting the DHCP client to not do this? Something in
>> /etc/dhclient.conf perhaps?
>
> Yes, you can specify 'prepend domain-name-servers 1.2.3.4;' or even
> use supersede instead of prepend - see the manual for details.

That worked a treat - many thanks.

> Another option is to make /etc/resolv.conf not-writable (chmod u-r)
> or even system immutable (chflags schg).

I'll hold that back as the 'nuke from orbit' option :-)

Jim
--
Twitter:@GreyAreaUK

"If you have enough book space, I don't want to talk to you."
Terry Pratchett