Sorry when this topic was already posted. I've seen similar topics but not my answer.
I've got pi-hole installed in a docker container and reachable with 192.168.1.5
I've got several VLAN's with access to this docker container. for example one of them is 192.168.3.0/24.
When starting the container, the DNS interface option always defaults to "allow only local requests".
For my VLAN with IP address 192.168.3.0/24 to make use of pi-hole I always have to reset the DNS interface option back to "permit all origins".
Is there a way to make this "permit all origins" the default option? And if yes, where can I do that?
I read the warning about dangerous etc. but only the internal network connects to pi-hole. So I see no danger to enabling it to "permit all origins".
Thanks in advance for your answers.
Check the Docker envvars listing at GitHub - pi-hole/docker-pi-hole: Pi-hole in a docker container
DNSMASQ_LISTENING
might be what you need.
Edit: Configuration - Pi-hole documentation might also be an option, that is an FTLDNS_
prefixed envvar though.
Thanks for pointing me to that. I was looking in the right direction. I edited the setupVars.conf en edited the variable from local to all. I restarted the container but nothing changed. Then I decided to recreate the container again with the new value. And it stays at the correct value now.
I thought editing the setupVars.conf file and restarting the container would be sufficient. I guess that was not the case.
Thanks for the help.
If you have the setupVars.conf
in a volume mount then you can set some configurations via that file. If you don't use mounts then setupVars.conf
is created each time you spin up a new container and you need to use the environment variables to set the content of that file.