Sorry haven't been around in a couple of days.
I have a Raspberry Pi4 with pihole running in my setup and I use a few methods to try and force all traffic to go there: for one, I use "block services" under the R9000's security settings to block ports 53 and 853 from all IP's EXCEPT my pihole's IP (192.168.1.2).
The iptable rules I use are to forward any requests from random devices going to googleDNS, cloudflare and openDNS, and force them to use my pihole instead. We have some devices in the house (alexa, roku. chromebook, TVs) that were trying to access google and cloudflare servers. I have a Nvidia Shield tv and I read somewhere that a user said his was constantly calling to the openDNS servers, so I added their addresses to my rules as well. I also added quad9's servers to the mix, well ...just because.
They look like this:
Code:
iptables -t nat -A PREROUTING -i br0 -d 8.8.8.8/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 8.8.4.4/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 1.1.1.1/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 1.0.0.1/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 9.9.9.9/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 9.9.9.10/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 9.9.9.11/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 149.112.112.112/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 149.112.112.10/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 149.112.112.11/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 208.67.222.222/32 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i br0 -d 208.67.220.220/32 -j DNAT --to-destination 192.168.1.2
Excessive? Probably, but as far as I can tell, these are working as intended. Thanks to HELLO_wORLD for guidance with the rules. Hopefully he sees this post and can confirm they look ok, because to be honest ... I have no clue what I'm doing LOL
These rules work in conjunction with my raspberry pi/pihole, so unfortunately if you don't have a similar setup, then none of this is going to help you, sorry.