# Nameserver NOT auto updated in /etc/resolv.conf

**URL:** <https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908>\
**Category:** Installed\
**Tags:** beta\
**Created:** [February 25, 2020, 8:44pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908 "2020-02-25T20:44:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [February 25, 2020, 8:44pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/1 "2020-02-25T20:44:25Z")

</div>

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?

Symptoms:  
It connects to the network and pings 8.8.8.8 fine but does nor resolve the names.  
So `"ping -c 5 www.google.com"` does not give a response. ☹

---

<div class="post-metadata">

**Author:** ![yoda](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/yoda/32/42_2.png) [@yoda](https://forum.elivelinux.org/u/yoda)\
**Post date:** [February 25, 2020, 9:13pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/2 "2020-02-25T21:13:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rebel450](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/rebel450/32/2737_2.png) [@Rebel450](https://forum.elivelinux.org/u/Rebel450)\
**Post date:** [February 26, 2020, 12:54pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/3 "2020-02-26T12:54:05Z")

</div>

Sounds a bit like a driver issue, no?

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [February 26, 2020, 1:35pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/4 "2020-02-26T13:35:15Z")

</div>

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:

> search [www.huaweimobilewifi.com](http://www.huaweimobilewifi.com)  
> nameserver 192.168.0.11  
> And in the router I've set where my queries should go.

But at home the router is at 192.168.0.1 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 blabla.bla.org" >> /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. 👍

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

> **[freedns.zone - freedns Resources and Information.](http://ww16.freedns.zone/en/why/?sub1=20250916-1528-583e-ba19-de0c97f37b10)**
>
> freedns.zone is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, freedns.zone has it all. We hope you find what you are searching for!

If you want to use one of their servers just use my string above (with sudo) and reblace [blabla.bla.org](http://blabla.bla.org) with the given IP adresses.

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [February 26, 2020, 11:58pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/5 "2020-02-26T23:58:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [February 27, 2020, 7:57am UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/6 "2020-02-27T07:57:39Z")

</div>

> [@Thanatermesis](#):
>
> 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. 🤔

---

<div class="post-metadata">

**Author:** ![Rebel450](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/rebel450/32/2737_2.png) [@Rebel450](https://forum.elivelinux.org/u/Rebel450)\
**Post date:** [February 27, 2020, 8:47am UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/7 "2020-02-27T08:47:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [February 27, 2020, 9:00am UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/8 "2020-02-27T09:00:45Z")

</div>

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! 👎
- /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:

---

<div class="post-metadata">

**Author:** ![yoda](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/yoda/32/42_2.png) [@yoda](https://forum.elivelinux.org/u/yoda)\
**Post date:** [February 27, 2020, 1:06pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/9 "2020-02-27T13:06:09Z")

</div>

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) ?

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [February 27, 2020, 3:13pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/10 "2020-02-27T15:13:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rebel450](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/rebel450/32/2737_2.png) [@Rebel450](https://forum.elivelinux.org/u/Rebel450)\
**Post date:** [February 27, 2020, 10:37pm UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/11 "2020-02-27T22:37:47Z")

</div>

> [@triantares](#):
>
> circumvent

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

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

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [February 28, 2020, 6:28am UTC](https://forum.elivelinux.org/t/nameserver-not-auto-updated-in-etc-resolv-conf/1908/12 "2020-02-28T06:28:34Z")

</div>

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