DNS Issue/bug after resetting the network adapters

Continuing the discussion from DNS Issue (probably bug) (since the topic I refer to is marked as solved, I decided to create a new one…):

I have got the same problem (described in DNS Issue (probably bug)) after resetting my network configuration following the guide http://docs.nethserver.org/projects/nethserver-devel/en/v7/nethserver-base.html#reset-network-configuration (this I had to do because I had tested to implement a bridge which didn’t work at all…). Of course, I had created a green interface like before but I got exactly the same error message as @Sebastian had got by trying to access the software center… also, like it was the case in sebastian’s situation, my server didn’t resolve any host names any more (also google.com didn’t work). hence, it was definitely the same problem…

The workaround proposed by @dnutan [quote=“dnutan, post:24, topic:5297”]
sed -ibak s/server=127.0.0.1/server=8.8.8.8/ /etc/dnsmasq.conf
systemctl restart dnsmasq
[/quote]worked fine… no error message is shown any more when accessing the software center. and also the resolution of host names is again working…

however, I don’t know how to change the nameserver via the server manager as proposed by @stephdl [quote=“stephdl, post:16, topic:5297”]
change it to 8.8.8.8 by the server-manager
[/quote]config show dns still points to 127.0.0.1 and also # grep server= /etc/dnsmasq.conf server=127.0.0.1 server=/uribl.com/127.0.0.1#10053 server=/dnswl.org/127.0.0.1#10053 server=/spamhaus.org/127.0.0.1#10053

Nevertheless, I can ping google.com and also nslookup google.com works again…

For the moment, it seems to work despite the wrong nameserver address… but how long?
I checked the /etc/e-smith/db/configuration/defaults/dns/NameServer file: 8.8.4.4,8.8.8.8

What do you think, is everything OK again and I can simply ignore the fact that the results of config show dns and grep server= /etc/dnsmasq.conf don’t look as they should (also in the /etc/dnsmasq.conf the IP address is 127.0.0.1, after a signal-event nethserver-dnsmasq-update event… but still I can access the software center and ping google and so…)??? or is the workaround only temporarily? which files do I need to change to make it permanently working? especially if I have to change something in my configuration of the network adapters again (for whatever reason…)?

You need to set external DNS for dnsmasq as suggested by Stephane.

But how?? I don’t see any possibility for that in the server manager or so…
probably I am just too stupid…! :wink:
you don’t mean the dns module, or? If yes, could you please tell me what I have to fill in for hostname?

Go to Network page, and hit the button “DNS servers”.

Set your remote DNS server (eg. 8.8.8.8)

1 Like

Thanks a lot for the very good description!! :wink: @giacomo

however, that change strangely caused some very amazing behavior…
After removing 127.0.0.1 and replacing it by 8.8.8.8 as primary DNS server in the network module, I have faced severe and definitely very strange problems with ssh…
I use putty to connect via ssh from my windows PC to the nethserver 7 remotely. Furthermore, I use filezilla client to connect via sftp.
When I made the change of the DNS server as described, I wasn’t able to connect with neither putty nor filezilla reliably any more…!!! From time to time the connection via filezilla worked but was very slow and was frequently interrupted…! Putty didn’t work at all (at least most of the time…)!

It took me a long time to realize that the only change I made was the replacement of the DNS server address…
And indeed, when I undoed it, i.e. setting 127.0.0.1 again as primary DNS, the ssh connection (both from putty and filezilla) again work and is stable…!

Hence, I set 127.0.0.1 to the primary DNS and 8.8.8.8 to the secondary DNS server in the network module… and ssh still works…! :wink:

However, I have no idea at all why the setting affected the ssh connection…!
Does anyone have any clue what could be the reason??? and are my last settings ok??