Nameserver NOT auto updated in /etc/resolv.conf

On moving my laptop to a new wifi network I notice that the nameserver address, which has to be set to the gateway address does not update.

Can anybody with access to different wifi networks check if this is a bug or just my machine?

It connects to the network and pings fine but does nor resolve the names.
So "ping -c 5" does not give a response. :frowning_face:

I moved several Laptops with ELive 32, 64 etc to several WiFi and the DNS resolutions always worked fine...

1 Like

Sounds a bit like a driver issue, no?

No, it has to do with when connecting to a gateway the client should use that gateway as the DNS server through a search string.
For instance when I connect to my mifi (mobile wifi router) it sets a string in "/etc/resolv.conf" like this:

And in the router I've set where my queries should go.

But at home the router is at and not that mifi router.
It should've been auto-magically altered on connection AFAIK.

It's not a big deal for me, I've added nameservers to resolv.conf countless of times in the past with:
"echo "nameserver" >> /etc/resolv.conf" also because I don't want my DNS queries to pass through Google owned ones.

But it could be an issue for others if this was a system bug. Looks like it isn't so that's good. :+1:

Read this if you're interested why I'm leary of certain DNS servers:

If you want to use one of their servers just use my string above (with sudo) and reblace with the given IP adresses.

1 Like

In the past I noticed that some ISP required strictly to use their nameservers in order to resolve domains (if i recall correctly)

So basically, try with a different ISP (internet coffe shop?) just to see if this is the cause

What do you mean is that network-manager doesn't set the nameservers that you are saying to set? or that they don't works?

I haven't checked yet as I've only just noticed.

The thing is that /etc/resolv.conf doesn't change i.e keeps the search string the same...which IMO it shouldn't.

Setting to a fixed DNS external [free]server solves that ... so no hurry. It's actually a better idea when not using a VPN. :thinking:

A bit hard to simulate the situation...
But we should not let it go :hooray:

It comes down to the network scripts when initializing a new connection or device.

Thinking about it:

  • Taking the offered gateway as nameserver is not a good idea (safety wise) when on unknown networks if one doesn't have a VPN or ssh proxy or at least a firewall running.
    I am not even fully in the clear [yet] if, when running over VPN and using i.e DNS through Google, the whole idea of privacy through VPN gets defeated.
    I suspect it does! :-1:
  • /etc/resolv.conf is fairly immutable so a fixed setting to an external [i.e FreeDNS] server by default is a better/safer option IMO... Even when using other precautions like VPN and/or firewall. :idea:
1 Like

I don't remember, when using VPN, how to validate / check wich DNS I am using.... Suppose it is the normal, default one ? YEs traffic goes trough VPN, but the DNS used is the one we got when we got our IP ( DHCP) ?

Yes but you can circumvent that by setting your own in /etc/resolv.conf

1 Like

:eyepopping: :disbelief:
never read/heard before.... (ya, ya my English is kinda poor, bla, bla :stuck_out_tongue: )
But why not

Methinks, this is alas kinda overdubbed, no ?
:madness: :nod: :nanana:


"work around" would be a good synonym ...... but then again:
Nice to have been able to add a tad to your knowledge. :smiley14:

1 Like