wrong/strange DNS while static network config

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
ripa
Posts: 12
Joined: Sat Oct 21, 2017 11:09 am

wrong/strange DNS while static network config

Post by ripa »

Hi,

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

My DNS Server is 192.168.178.1. ... a hardcoded DNS Server isr REALLY uncool!

Greetings ripa
Attachments
dietpi_staticIP.JPG
Nanopi Neo 512
User avatar
WarHawk
Posts: 630
Joined: Thu Jul 20, 2017 8:55 am

Re: wrong/strange DNS while static network config

Post by WarHawk »

Is that your DNS from your default gateway?

I wonder if you have a list in /etc/network/interfaces that has nameservers listed
User avatar
MichaIng
Site Admin
Posts: 2417
Joined: Sat Nov 18, 2017 6:21 pm

Re: wrong/strange DNS while static network config

Post by MichaIng »

@ripa
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).
ripa
Posts: 12
Joined: Sat Oct 21, 2017 11:09 am

Re: wrong/strange DNS while static network config

Post by ripa »

Hey,

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 :(

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


The crazy thing is, that i cant find the provider ip in the config...:
________________________________________
#/etc/network/interfaces
#Please use DietPi-Config to modify network settings.

# Local
auto lo
iface lo inet loopback

# Ethernet
allow-hotplug eth0
iface eth0 inet static
address 192.168.178.22
netmask 255.255.255.0
gateway 192.168.178.1
dns-nameservers 192.168.178.1
________________________________________

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

nameserver 62.109.121.1
nameserver 62.109.121.2


How is this possible? How does the Pi know which resolvers the default gateway uses? I dont get it...
Nanopi Neo 512
User avatar
MichaIng
Site Admin
Posts: 2417
Joined: Sat Nov 18, 2017 6:21 pm

Re: wrong/strange DNS while static network config

Post by MichaIng »

@ripa
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.
Post Reply