wrong/strange DNS while static network config


what ist this Where is it come from? I dont want this!

My DNS Server is … a hardcoded DNS Server isr REALLY uncool!

Greetings ripa

Is that your DNS from your default gateway?

I wonder if you have a list in /etc/network/interfaces that has nameservers listed

You have somehow added your desired DNS IP two times. Could you try to add it just a single time in this menu and apply settings (which restarts network interfaces!)?

We do not hard code anything there, so either the doubled entry is not accepted, leading to your system applying the DNS server from your default gateway, or indeed as stated by WarHawk, when connecting to the e.g. router, it overwrites your DNS by the one used by the router itself. But hmm, actually the DNS shown in the menu is scraped from /etc/network/interfaces which definitely is not changed by anything externally (other than /etc/resolv.conf).


thanks for you replies. I checked it and you were right. Its the DNS of my Router (Provider default).
But why is the dietpi system using this, and how could it know this? The router isnt publish it to the clients. I did a clean reinstall twice… Ended every time with this hardcoded DNS :frowning:

Even without doubling the DNS ip - no change at all.

The crazy thing is, that i cant find the provider ip in the config…:

#Please use DietPi-Config to modify network settings.


auto lo
iface lo inet loopback


allow-hotplug eth0
iface eth0 inet static

But found them in the /etc/resolv.conf:


How is this possible? How does the Pi know which resolvers the default gateway uses? I dont get it…

Indeed strange. In case of DHCP, of course the DHCP server (router) usually provides the DNS server info for the clients. I also never heard of this being done without DHCP, but static IP info.

Okay but in your case, you set the router itself as static DNS server. Perhaps there is some mechanism, that router, being called with DNS request, answers by providing/overriding the DNS info that itself uses.
At least resolvconf generally is able to read/write/update DNS info. If uses /etc/network/interfaces and in case applies the DNS entry provided there, but generally another program/system can use resolvconf to set/override DNS info.