So this is my first post. I have two interrelated questions which I have yet to find an answer to. I'm a home user so may have made a basic mistake, so forgive my questions if they are really silly
I have a mikrotik router and a rpi pihole. All works ok but if the rpi pihole dns responds in 30ms and the native mikrotik dns responds in 6ms, could I chain the two together where all my clients use the mikrotik DNS and the mikrotik DNS gets the IP from the pihole? Would that be sensible?
I have tried but failed to create this setup and notice that the pihole seems to block things like pings and DNS queries from the router (gateway). Is that expected behaviour and can unblock that?
Pi-hole can't block pings.
This is likely a network (mis)configuration (your router probably can block pings) or a ping destination that does not respond to pings.
You could chain your router and Pi-hole but you wouldn't get any speed advantages. If your DNS queries take
Clients > Router> Pi-hole > Internet and DNS resolution takes 30msec for Pi-hole your downstream clients won't get the answer faster (because your router does not know the answer yet, it has to wait for Pi-hole to reply.).
Thanks for the response.
My logic is that the first lookup may not be quicker but subsequent ones would be.
Does the pihole set ANY restrictions on pings from the gateway itself?
Pi-hole caches DNS answers as long as they are valid. Any subsequent query to the same domain will be served immediately if the TTL has not expired.
No.Pi-hole is not involved in pings other than resolving the target domain to IP. If you ping an IP directly, Pi-hole isn't involved at all.