bartgrefte
Posts: 22
Joined: Wed Aug 19, 2015 11:31 am

changing DNS-servers

Wed Jul 25, 2018 12:10 pm

Somewhere in the past, I configured Raspbian to use Google's DNS servers.
Since those are quite slow when it comes to picking up DNS updates, I want to switch DNS servers.

The problem is, I can't remember where I set it to use Google's DNS servers. The only file I found with Googles DNS servers in it is the automatically generated /etc/resolv.conf, but not /etc/network/interfaces, nor /etc/dhcp/dhclient.conf contain Googles DNS servers and my router isn't sending those either.
edit: And /etc/dhcpcd.conf contains my router's IP as DNS server, not Google.

Am I missing something? :?

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: changing DNS-servers

Wed Jul 25, 2018 1:08 pm

This page might help you find your setting.
https://wiki.debian.org/NetworkConfigur ... ameservers

User avatar
topguy
Posts: 5686
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: changing DNS-servers

Wed Jul 25, 2018 1:09 pm

*deleted*

epoch1970
Posts: 3573
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: changing DNS-servers

Wed Jul 25, 2018 4:12 pm

Look in /etc/rc.local or for some custom script you might have added somewhere.
Or maybe you followed one of the brightest advices of all times and made /etc/resolv.conf immutable. lsattr and chattr would be of help in this case.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

bartgrefte
Posts: 22
Joined: Wed Aug 19, 2015 11:31 am

Re: changing DNS-servers

Thu Jul 26, 2018 11:01 am

SurferTim wrote:
Wed Jul 25, 2018 1:08 pm
This page might help you find your setting.
https://wiki.debian.org/NetworkConfigur ... ameservers
Network Manager wasn't the cause either, already checked the other files mentioned. Thanks for the reading material though ;) (That new bookmark will probably come in handy from time to time)
epoch1970 wrote:
Wed Jul 25, 2018 4:12 pm
Look in /etc/rc.local or for some custom script you might have added somewhere.
Or maybe you followed one of the brightest advices of all times and made /etc/resolv.conf immutable. lsattr and chattr would be of help in this case.
There's nothing in rc.local, as for /etc/resolv.conf:
lsattr
----i---------e---- ./resolv.conf
I think you nailed it :)

Yesterday I thought I'd found the culprit though, I thought maybe PiHole was overwriting that file and since I configured it to use Google... So I reconfigured PiHole to use OpenDNS, /etc/resolv.conf didn't change, not even after a reboot. Changing DNS-servers in PiHole did solve the problem of delayed DNS updates though, OpenDNS picks those up quite a bit faster than Google :)
(For comparison, OpenDNS needs a couple of seconds, Google about an hour or so.)

Return to “Networking and servers”