Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #256962

Re: how to change default nameserver?

From gene heskett <gheskett@shentel.net>
Newsgroups linux.debian.user
Subject Re: how to change default nameserver?
Date 2023-04-09 14:50 +0200
Message-ID <GiCEx-Rbu-3@gated-at.bofh.it> (permalink)
References <GizdD-Pbo-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <c.brinkhaus@t-online.de> 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 <http://geneslinuxbox.net:6309/>

Back to linux.debian.user | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: how to change default nameserver? Timothy Butterworth <timothy.m.butterworth@gmail.com> - 2023-04-09 11:10 +0200
  Re: how to change default nameserver? Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-04-09 12:50 +0200
    Re: how to change default nameserver? Nicolas George <george@nsup.org> - 2023-04-09 13:00 +0200
      Re: how to change default nameserver? gene heskett <gheskett@shentel.net> - 2023-04-09 15:10 +0200
      Re: how to change default nameserver? Brian <ad44@cityscape.co.uk> - 2023-04-09 15:20 +0200
    Re: how to change default nameserver? Dan Ritter <dsr@randomstring.org> - 2023-04-09 14:10 +0200
  Re: how to change default nameserver? Dan Ritter <dsr@randomstring.org> - 2023-04-09 13:10 +0200
    Re: how to change default nameserver? gene heskett <gheskett@shentel.net> - 2023-04-09 15:10 +0200
      Re: how to change default nameserver? Dan Ritter <dsr@randomstring.org> - 2023-04-09 16:00 +0200
  Re: how to change default nameserver? gene heskett <gheskett@shentel.net> - 2023-04-09 14:50 +0200

csiph-web