Hi Everyone,
Long time lurker, first time poster.
I have pihole running on a dedicated ubuntu server install in a linux container.
I use a private upstream DNS server that I am pretty happy with, but some sites I need apparently flag it as being potentially malicious, and either return queries empty, or don’t reply at all and just time out.
I want to keep using this DNS server, but I would like to add overrides for specific domain names.
After reading some guides on how I might do this, the most appropriate way seems to be to create a custom config file in /etc/dnsmasq.d with the custom overrides.
So I created /etc/dnsmasq.d/99-overrides.conf
In it I have a list of domain names and DNS servers in the following format
server=/<domain name>/<IP to DNS server>
server=/<domain name>/<IP to DNS server>
server=/<domain name>/<IP to DNS server>
After saving my config file and restarting the Pihole-FTL service, the custom rules do not appear to work. I have flushed the DNS cache on one of my clients, and running dig on these domains I still do not get a response. Monitoring pihole -t during restart, I see no evidence that my custom config file is being read. Am I right to expect a “read” output during startup if it is being read properly?
Is there something here that I am missing? How would I go about troubleshooting this?
I appreciate any input.
I do understand the value of the debug output from pihole, but that contains a lot of rather private information about my network that I would rather not share, so maybe we can keep the advice at a high level, and I’ll try to figure it out?
Interestingly, it does appear as if at least pihole -d sees my custom config file:
*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d
-rw-r--r-- 1 root root 57 Aug 16 2024 /etc/dnsmasq.d/02-custom-settings.conf
dns-forward-max=5096
min-cache-ttl=300
rebind-domain-ok=
-rw-r--r-- 1 root root 87 Sep 24 02:02 /etc/dnsmasq.d/99-overrides.conf
server=/<redacted>/1.1.1.1
server=/<redacted>/1.1.1.1
server=/<redacted>/1.1.1.1
I have tried some large DNS servers, including cloudflare, google and a couple of others here, which should be able to pull these domains.
How can I confirm whether or nor the specified override DNS is actually being queried for these domain names now?
If I can do that, I can narrow it down to whether it is a configuration issue on my piHole box, or if the issue is upstream. (in other words, the DNS server somehoe doesn’t like my public IP and is taking it upon itself to not forward me the IP’s I need)
I’d appreciate any input.
Thanks!