Hello! I use Pi-hole as a docker-image on TrueNAS. I configured it and it works fine mostly for my DHCP and DNS needs. However, I have two seemingly small issues, which I couldn't resolve even after research here and it other places.
I think those two issues are connected perhaps, so I will describe them in this post together.
I use a bunch of DNS-names which resolve externally to a public IP address, but internally (using the "Local DNS"/"DNS Record" function with locally significant private IP addresses. This works fine for most of the names, except the one name which refers to the same name which the host holds which Pi-Hole is running on.
Also, I observe that under "Settings/DHCP/Pi-hole domain name" the domain name that I configure there is not preserved over restarts of the container. All other configuration of Pi-Hole is preserved.
Summary of facts:
"fractal" is the hostname of Pi-Hole, "fp.on.at" is the domain, "fractal.fp.on.at" is the FQDN which should be resolved locally to a private IP. Instead, it is resolved to the public IP served by public upstream DNS. The Pi-hole domain name cannot be set to fp.on.at persistently.
Expected Behaviour:
I expect to resolve this one name to the given private IP adress configured in Pi-Hole.
Actual Behaviour:
Instead, it is resolved to the public IP served by public upstream DNS.
Debug Info:
When I check pi-hole.log, it looks fine:
Feb 1 22:37:47: query[A] fractal.fp.on.at from 192.168.0.45 Feb 1 22:37:47: /etc/pihole/custom.list fractal.fp.on.at is 192.168.0.2
It seems, the info is overridden by something else? However, the client (Ubuntu) has configured Pi-Hole only as DNS via DHCP from Pi-Hole. When I clear the cache and ping the name, it works for the first time. But for the second time, it's pointing to the outside IP again.
Thanks for any advice