I have Raspberry Pi running pi hole for years.
I expect to have my browing working normally.
I have 10G internet, Fiber.
I use OpenDNS upstream DNS Server.
Pi-Hole works, it blocks adds. But when I'm browsing its slow, often fails to load webpages, and appears offline within few seconds of retrying then works.
My pi-hole has a static IP of 192.168.2.3, and DHCP is keeping that IP for pi-hole only.
My router is configured to use pi-hole for DNS server.
Actual Behaviour:
Its slow browsing, often DNS resolution fails.
When I disable pihole temporarily it works fast.
That is all relatively new, and I don't think I made any change to anything recently. It used to work fine.
Your debug log shows router is distributing its own IP as DNS server:
*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
Scanning all your interfaces for DHCP servers
* Received 548 bytes from eth0:192.168.2.1
Offered IP address: 192.168.2.3
DHCP options:
Message type: DHCPOFFER (2)
router: 192.168.2.1
dns-server: 192.168.2.1
That is also demonstrated by your first nslookup result, showing the Address: 192.168.2.1 of your router. But as that nslookup returns the correct answer for pi.hole, that would indicate that your router is using Pi-hole at its upstream DNS.
That is a valid configuration, but you won't be able to attribute DNS requests to individual clients.
From that same client, please have a look at the DNS server section from the output of the following command:
ipconfig /all
We'd just need the lines from the DNS server section.
Hi,
Thanks for the help,
Yes that's right, all my requests appear from 192.168.2.1, the router.
I have an internet modem/router on my LAN which can not be bridged, so I did that way to make it work... Not ideal but I could not easily have each clients shown in the query list.
That could explain intermittent slowdowns:
Your router is aggregating DNS traffic of your entire network, which may trigger Pi-hole's rate limit at times, i.e. if the number of DNS requests per second gets too large, Pi-hole will reject DNS requests until the traffic quiets down again.
Pi-hole Diagnosis should show a rate limit warning from time to time in that case, and those should correlate with times of slow DNS traffic if that would be the cause.
To mitigate this, instead of using Pi-hole as your router's upstream, you should try to have your router distribute your Pi-hole host IP as local DNS resolver (often, that's a LAN/DHCP kind of option). This would also allow you to attribute DNS requests to individual clients.
If your router does not allow you to propagate a local DNS resolver, you can also try to adjust Pi-hole's RATE_LIMIT. Assuming individual clients, it defaults to 1000/60, so I'd probably start with n / 2 times 1,000, where n is the number of devices in your network, e.g. if you had 6 devices connecting, I'd try 3000/60.
Actually I had a warning about that in Tools/ Pi-hole diagnosis. I changed to 1500, and noticed not much difference.
What is strange is that it was only 1 warning then once deleted, it was no more visible yet the issue was still present.
After reading your comment, I changed to 4500 queries within 60 seconds, and it seems to work much better. That was not instant but within few hours it seems to be back to normal.