resolv.conf questions

Gilles Gravier ggravier at fsfe.org
Wed Aug 7 12:19:17 UTC 2019


Eliza,

On 07/08/2019 13:54, Eliza wrote:
> Sorry I was still confused.
> When I put the line into /etc/resolv.conf:
>
> nameserver 8.8.8.8
>
> after a while it was replaced by the default one:
>
> nameserver 127.0.0.53
>
> How can I enforce to use 8.8.8.8 as nameserver?
>

I  have the same issue. Here is how I resolved it (beware that if you do
that, logging into captive portals won't work anymore, whereas with
127.0.0.53 it will).

Go to /etc/resolvconf/resolv.conf.d and edit the file head

Add the line(s) nameserver 8.8.8.8 at the end.

While you're at it, add nameserver 8.8.4.4

And any other nameserver line you want (for example cloudflare's 1.1.1.1
DNS servers).

If you don't find that directory / file, you might be missing the
package resolvconf (sudo apt-get install resolvconf)

Then you can edit the above file.


Once this is done, reboot and voila.


Tell us if it works for you!

Gilles





More information about the ubuntu-users mailing list