Hello,
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.
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:
interface eth0
static ip_address=192.168.178.65/24
static routers=192.168.178.1
static domain_name_servers=192.168.178.72
Unbound, version 1.13.1, is installed using the description at URL https://docs.pi-hole.net/guides/dns/unbound/ (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:
# Generated by resolvconf
forward-zone:
name: "."
forward-addr: 192.168.178.72
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.
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.
I suspect that file resolvconf_resolvers.conf is generated by unbound itself. Is this assumption correct?
If so, how can one prevent the file from being generated again?
Regards,
Wim Nelis.