Is there any way to set pihole to this by environment variable?
Setting DNSMASQ_LISTENING
to single
sets "Respond only on interface enp3s0". all
and local
leads to "Allow only local requests" and "Permit all origins". Is there one option missing?
Are you running Pi-hole in a docker container?
Yes. Maybe I should have mentioned it.
Binding any interface is conflicting with other containers. So I have to make pihole use that option on any start and creation of the container.
Please, post your compose file or docker run
command used to start your container.
docker run -d
--name=pihole
--network=host
-v /home/core/containers/pihole/etc-pihole:/etc/pihole:Z
-v /home/core/containers/pihole/etc-dnsmasq.d:/etc/dnsmasq.d:Z
--env DNSMASQ_LISTENING=single
--env FTLCONF_LOCAL_IPV4=172.20.2.2
--env FTPCONF_BLOCK_ICLOUD_PR=false
--env INTERFACE=enp3s0
--env PIHOLE_DNS_=127.0.0.1#5335
--env REV_SERVER=true
--env REV_SERVER_CIDR=172.20.2.0/24
--env REV_SERVER_DOMAIN=fritz.box
--env REV_SERVER_TARGET=172.20.2.1
--env TZ=Europe/Berlin
--env WEBTHEME=default-auto
--env WEB_PORT=8000
docker.io/pihole/pihole:latest
Apparently your compose file is fine.
Maybe you should try without the :Z
option on the volumes, but I'm not sure if this is causing an issue.
Try DNSMASQ_LISTENING=bind
.
I think this option is missing on the Docker repo README file.