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


Groups > linux.debian.user > #256942

Re: how to change default nameserver?

From Timothy Butterworth <timothy.m.butterworth@gmail.com>
Newsgroups linux.debian.user
Subject Re: how to change default nameserver?
Date 2023-04-09 11:10 +0200
Message-ID <GizdD-Pbo-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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.

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

Back to linux.debian.user | Previous | NextNext 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