0

First of all, this is not a duplicate of How do I include lines in resolv.conf that won't get lost on reboot?, as

A) It has not been working since 14.04. See the comment:

In 14.04 this answer did nothing for me. – Jay Sullivan Jun 30 '14

B) The answer there is to use /etc/resolvconf/resolv.conf.d/base file, but this question asks exactly why /etc/resolvconf/resolv.conf.d/base file is not working.

Following up on Use dnsmasq as system DNS service, I installed resolvconf as per the latest reply/answer, however, I found that, the /etc/resolvconf/resolv.conf.d/base file, which should be use to preset nameserver values as per all documents that I read, is not doing what is advertised/documented. Here is what the man page says:

/etc/resolvconf/resolv.conf.d/base
File containing basic resolver information. The lines in this file are included in the resolver configuration file even when no interfaces are configured.

However I found that, whatever info I put into the /etc/resolvconf/resolv.conf.d/base file, they would never show up in /etc/resolv.conf.

So just to confirm, is there any way to properly configured nameserver of /etc/resolv.conf for resolvconf?

So far my conclusion is that

  • the 127.0.0.1 is hard-coded for resolvconf and there is no way to overwrite it.
  • the only way is to supersede it in /etc/resolvconf/resolv.conf.d/head, producing two nameservers in /etc/resolv.conf file. One valid and the other invalid (127.0.0.1).

And I truly hope that I'm wrong.

P.S. this is LUbuntu 18.04.2:

$ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic
xpt
  • 1,045
  • using 18.04 desktop version ? if so, you must look at systemd.resolved and networkmanager too – cmak.fr Jul 17 '19 at 07:00
  • I'm still confused what are you trying to do? You want to change the nameserver in resolv.conf ? – JoKeR Jul 17 '19 at 22:01
  • Exactly @JoKeR. To *change* the default 127.0.0.1 to a valid one. – xpt Jul 18 '19 at 02:03
  • what happens if you write sudo nano /etc/resolv.conf and enter it manually and save it. – JoKeR Jul 18 '19 at 09:32
  • It then get overwritten all the time. Do a search then you'll know, @JoKeR. – xpt Jul 18 '19 at 13:27
  • The network automatically overwrites it with the correct dns that is assigned by your system if you delete the content of resolv.conf and input lets say nameserver 8.8.8.8 and nameserver 8.8.4.4 it will work but once you reload Network Manger it will apply your Network dns which your system uses. In my case my dns gets overwritten by my VPN that I use because that is a dns it relies on. – JoKeR Jul 18 '19 at 15:13
  • Yes, exactly, your manual input will work, but once you reload Network Manger, or machine get started, it'll got the wrong value (127.0.0.1) again, @JoKeR. I.e., I'm providing my own DNS, so the hard-coded 127.0.0.1 will always be wrong for me, albeit it might be the correct dns for you. See my linked question in OP. – xpt Jul 19 '19 at 12:40
  • 3
  • @JoKeR, The answer there is to use /etc/resolvconf/resolv.conf.d/base file, but this question asks exactly why /etc/resolvconf/resolv.conf.d/base file is not working. – xpt Jul 22 '19 at 13:55
  • there are a couple of working examples – JoKeR Jul 22 '19 at 17:51
  • but none of them answer the question why /etc/resolvconf/resolv.conf.d/base file is not working, which is what this question is for. – xpt Jul 23 '19 at 15:50

0 Answers0