<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p><br>
</p>
<p>A few days ago Pi-hole on a Raspberry Pi was extended with
unbound. It worked until a power-failure, which caused the
internet modem / router to be off for some time. After that the
DNS resolving did not work. It turned out that there was a
resolving loop, as a new configuration file
/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf was added.</p>
<p><br>
</p>
<p>The details. The Raspberry Pi, called rpi30 with IP address
192.168.178.72, was upgraded from buster to bullseye. An SD-card
was prepared on another Raspberry Pi, at which time a DNS
forwarding to the aforementioned IP address was needed for tests.
The configuration in file /etc/dhcpcd.conf was:</p>
<p><font face="monospace"> interface eth0<br>
static ip_address=192.168.178.65/24<br>
static routers=192.168.178.1<br>
static domain_name_servers=192.168.178.72<br>
</font><br>
</p>
<p>Unbound, version 1.13.1, is installed using the description at
URL <a class="moz-txt-link-freetext" href="https://docs.pi-hole.net/guides/dns/unbound/">https://docs.pi-hole.net/guides/dns/unbound/</a> (Pi-hole version
5.11.4, FTL version5.16.2). A few days ago, the Raspberry Pi rpi30
was restarted using the newly prepared SD-card (after changing the
name and the IP address). DNS resolving did not work because of
configuration file resolvconf_resolvers.conf. It's contents were:</p>
<p><font face="monospace"> # Generated by resolvconf<br>
<br>
forward-zone:<br>
name: "."<br>
forward-addr: 192.168.178.72</font><br>
</p>
<p>It is clear that it was needed in the test configuration.
However, when used in rpi30 it causes a loop. A DNS request
arriving at rpi30 would be forwarded to Pi-hole. If the request
could not be resolved by Pi-hole, it would forward it to
127.0.0.1#5335, at which port unbound is listening. Due to the
configuration generated by resolvconf, the request would be
forwarded back to Pi-hole. After removal of the configuration file
and a restart of unbound, DNS resolving functioned well. System
service unbound-resolvconf was stopped and disabled, an attempt to
prevent the configuration file from being generated again.<br>
</p>
<p>After a power-failure affecting the internet modem / router, the
problem of a loop in DNS forwarding re-appeared. The time of
creation of file resolvconf_resolvers.conf was the time at which
the Internet connection was operational again. It's contents were
as shown above. The file is deleted and unbound is restarted to
get DNS operational.<br>
</p>
<p><br>
</p>
<p>I suspect that file resolvconf_resolvers.conf is generated by
unbound itself. Is this assumption correct?</p>
<p>If so, how can one prevent the file from being generated again?</p>
<p><br>
</p>
<p>Regards,</p>
<p> Wim Nelis.<br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>