Am Sun, Apr 09, 2023 at 04:20:49PM +0800 schrieb cor...@free.fr:
> greetings,
> 
> I know I can edit the entries in /etc/resolv.conf, but it will be
> overwritten by DHCP server.
> I searched the internet and got one of the answers:
> 
> apt install resolvconf
> echo "nameserver 127.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
> 
> what's the difference for /etc/resolv.conf and the method above?
 
There is a thrid method I use. I have add the following lines to
/etc/dhcp/dhclient.conf:

interface "bond0" {
supersede domain-name-servers 127.0.0.1;
}

My interface is bond0. Yours might be different.

Kind regards,
Christoph
-- 
Ist die Katze gesund
schmeckt sie dem Hund.

Reply via email to