Permanently changing nameserver

Thomas Charron twaffle at gmail.com
Mon Aug 2 14:38:55 EDT 2021


  You can also add this to /etc/dhcp/dhclient.conf

interface "eth0" {
    supercede domain-name-servers 192.168.1.1;
}

On Mon, Aug 2, 2021 at 1:37 PM Bruce Dawson <jbd at codemeta.com> wrote:

> This is being set by dhclient when it gets the DHCP info.
>
> I believe you can "fix" this by removing the 'domain-name-servers' from
> the 'request' stanza in /etc/dhcp/dhclient.conf. You probably want to do
> this ONLY on the machines that you don't want to get the DNS servers from
> DHCP.
>
> --Bruce
> On 8/2/21 11:45 AM, Bruce Labitt wrote:
>
> Due to some ISP snafus, and network reconfiguration, some of my RPI's are
> pointing to the wrong nameserver.  I use a pihole for DNS.  Anyways, I have
> a single RPI2 as a print server and it is stubbornly pointing to the wrong
> IP address.  The RPI2 is running on Raspberry Pi Debian Stretch.  I only
> use this node as the cups printer.
>
> If I do cat /etc/resolve.conf I get, # generated by resolvconf
> nameserver  192.168.1.xxx
> I want to have it permanently point to 192.168.1.1, ie the gateway so that
> I let the router redirect DNS traffic to pihole.  Looking at resolvconf
> info, it says NOT to use it directly.  So how does one do this?
>
>
> _______________________________________________
> gnhlug-discuss mailing listgnhlug-discuss at mail.gnhlug.orghttp://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>


-- 
-- Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/pipermail/gnhlug-discuss/attachments/20210802/6d7f1f77/attachment.html 


More information about the gnhlug-discuss mailing list