Path: csiph.com!fu-berlin.de!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: gene heskett Newsgroups: linux.debian.user Subject: Re: how to change default nameserver? Date: Sun, 09 Apr 2023 14:50:01 +0200 Message-ID: References: X-Mailbox-Line: From debian-user-request@lists.debian.org Sun Apr 9 12:48:27 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.6 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, LDO_WHITELIST=-5, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, WEIRD_PORT=0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate:hard: -3.5 Auth-Sender: gheskett@shentel.net MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Ctch-Spam: Unknown X-Ctch-Refid: str=0001.0A742F25.6432B404.0049,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-Originalarrivaltime: 09 Apr 2023 12:47:18.0369 (UTC) FILETIME=[6B401D10:01D96AE1] X-Mailing-List: archive/latest/798264 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/5c855600-d3ae-a008-8fdf-31c2f93d5ef1@shentel.net Approved: robomod@news.nic.it Lines: 42 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sun, 9 Apr 2023 08:48:03 -0400 X-Original-Message-ID: <5c855600-d3ae-a008-8fdf-31c2f93d5ef1@shentel.net> X-Original-References: Xref: csiph.com linux.debian.user:256962 On 4/9/23 05:05, Timothy Butterworth wrote: > After you edit resolv.conf make the file immutable with chattr. Chattr +i makes immutable chattr -i removes immmutable. > > On April 9, 2023, at 4:51 AM, Christoph Brinkhaus wrote: > > Am Sun, Apr 09, 2023 at 04:20:49PM +0800 schrieb coreyh@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. > That got changed in my install of bullseye. It might work to add that as a final stanza by copy/pasting the buster version, but its not been tried with bullseye, by me. > Kind regards, > Christoph Cheers, Gene Heskett. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page