:: Re: [DNG] resolv.conf
Página Inicial
Delete this message
Reply to this message
Autor: tito
Data:  
Para: dng
Assunto: Re: [DNG] resolv.conf
On Mon, 09 May 2022 11:52:14 +0100
Rowland Penny via Dng <dng@???> wrote:

> On Mon, 2022-05-09 at 12:31 +0200, al3xu5 via Dng wrote:
> > Mon, 9 May 2022 04:49:35 -0400 - Steve Litt <
> > slitt@???>:
> >
> > > Antony Stone said on Sun, 8 May 2022 16:28:38 +0200
> > >
> > > > On Sunday 08 May 2022 at 16:24:03, william m. moss wrote:
> > > >
> > > > > Years ago I became fed up with too many applications and
> > > > > installations corrupting my resolv.conf. I type in a
> > > > > resolv.conf
> > > > > using an editor.    

> > > >
> > > > Me too.
> > >
> > > Me three.
> > >
> > > >
> > > > > To prevent the file from being corrupted by other
> > > > > applications:    

> > > >
> > > > chattr +i /etc/resolv.conf
> > >
> > > I chattr +i /etc/resolv.conf also. Besides that, I run my own DNS
> > > (unbound) and strongarm my /etc/resolv.conf to that.
> >
> > Me four.
>
> That is just a bandaid on something broken. If you have to stop
> something being changed, then there must be something trying to change
> it. You need to find what that 'something' is and stop that changing
> resolv.conf
>
> Rowland
>


Hi,
two usual culprits are network-manager and/or dhclient.
For network manager add in /etc/NetworkManager/NetworkManager.conf [main] section;

dns=none

for dhclient create a file "/etc/dhcp/dhclient-enter-hooks.d/nodnsupdate"
with content:

#!/bin/sh
make_resolv_conf(){
        :
}



Hope this helps.

Ciao,
Tito