Hello, I have a problem with my pihole which I can't get solved but is probably relatively easy to solve.
My Pihole container does not answer DNS requests, it gives a communication error and the requests are not displayed on the dashboard. However, as soon as I go into the settings, do not change, and just press save, the Pihole works fine until the next reboot. The problem is probably in the /etc/dnsmasq.d/01-pihole.conf file that is overwritten on reboot. Here is the file after a reboot:
addn-hosts=/etc/pihole/local.list
addn-hosts=/etc/pihole/custom.list
domain-needed
localise-queries
bogus-priv
no-resolv
log-queries
log-facility=/var/log/pihole/pihole.log
log-async
interface=
cache-size=10000
And here the file after save:
addn-hosts=/etc/pihole/local.list
addn-hosts=/etc/pihole/custom.list
localise-queries
no-resolv
log-queries
log-facility=/var/log/pihole/pihole.log
log-async
cache-size=10000
server=10.200.1.11
domain-needed
expand-hosts
bogus-priv
dnssec
trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
except-interface=nonexisting
And here is my docker-compose.yaml:
version: "3"
services:
#Pi-Hole
pihole_server:
container_name: pihole_server
image: pihole/pihole:latest
hostname: pihole01
environment:
TZ: 'Europe/Berlin'
WEBPASSWORD: 'XDyf9BkDTcrq8aLZ'
volumes:
- '/root/docker/dns/pihole:/etc/pihole'
- '/root/docker/dns/dnsmasq:/etc/dnsmasq.d/'
- '/root/docker/dns/cron_pihole:/etc/cron.d/pihole'
- '/root/docker/dns/hosts:/etc/hosts'
restart: unless-stopped
networks:
server:
ipv4_address: 10.200.1.10
#Unbound
unbound:
container_name: unbound_server
image: alpinelinux/unbound:latest
volumes:
- '/root/docker/dns/unbound:/etc/unbound'
restart: unless-stopped
networks:
server:
ipv4_address: 10.200.1.11
networks:
server:
name: server
external: true
The problem is I have no idea why the pihole behaves like this. Even if the file is recreated, which I understand, why are the settings not applied instead of loading the default file?
I hope someone can help me