Score:0

Where is the resolvconf database, and how to reset it?

in flag

I am running Ubuntu 21.10 Desktop. For my work, I have to jump between different VPNs, and in the past I had to adjust DNS nameservers for some of them, too. I did this just with editing my /etc/resolv.conf file.

I do not need this anymore, but somehow this nameserver IP is still stored somewhere in resolvconf's configuration. And I was not able to find out where resolvconf is storing these IPs.

For example, my current /etc/resolv.conf:

nameserver 1.1.1.1
nameserver 8.8.4.4
nameserver 1.0.0.1

If I run resolvconf -u this changes the file to:

nameserver 10.12.1.1
nameserver 1.1.1.1
nameserver 1.0.0.1

Where the first is the IP I would like to get rid of completely.

While resolvonf -l is listing:

resolvconf -l
# resolv.conf from <my current connected VPN>
nameserver 1.1.1.1
nameserver 1.0.0.1

I don't have any more custom configuration in /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

resolvectl status only contains two items with DNS servers:

Global
         Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
  resolv.conf mode: foreign
Current DNS Server: 1.1.1.1
       DNS Servers: 1.1.1.1 8.8.4.4 1.0.0.1

Link 2 (wlp59s0)
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 8.8.8.8
       DNS Servers: 8.8.8.8
        DNS Domain: --

My resolvectl version:

$ resolvectl --version
systemd 248 (248.3-1ubuntu8.2)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS -OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP -LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified

resolconf version:

$ resolvconf --version
openresolv 3.12.0

Where is the "resolvconf database" or cache, where is resolvconf -u getting this IP from? How do I reset it to "factory settings"?

in flag
Does `resolvectl flush-caches` do anything? If not, what is the Terminal output of `resolvectl status`?
Paul Wellner Bou avatar
in flag
I added the output of `resolvectl status`. Flushing caches does not change anything.
David avatar
cn flag
Latest version is not a version number. There are several that could be called latest and is it desktop or server?
Paul Wellner Bou avatar
in flag
True, sorry. Added the missing information.
muru avatar
us flag
I don't think recent versions of Ubuntu even use `resolvconf` the program. It's `systemd-resolved` that's usually used by default. If you're using `resolvconf`, then you must be manually configuring it using the files in `/etc/resolvconf/`.
Paul Wellner Bou avatar
in flag
How can I check this? I don't have anything configured in `/etc/resolconf/*`. But anyway... somewhere there is a place where the `10.*` IP is still saved, and where `resolvconf -u` is reading it from. And I really would like to know where.
Score:0
in flag

I think I found it. Beside resolv.conf there is another file in /etc/: resolvconf.conf, and in this file I had the nameserver IP.

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=10.12.1.1
#name_servers=127.0.0.1

I don't know how it ended up here, but removing it there fixes my problem.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.