When configuring and operating a LAN the DNS variants of DoT (DNS over TLS) and DoH (DNS over HTTPS) are a pain as they bypass the normal DNS policies and usage agreements.
So the solution is to Whack them. The result is the fail back to normal DNS and policy implementations.
The first wack is to constrain DoT. Here we go:
/sbin/iptables -i br0 -I FORWARD 1 -p tcp --destination-port 853 -j DROP
The next is DoH. Its more complex. DoH requires at least one valid DNS call and therein lies the path to mess with it. On DNSMASQ you can signal via the canary domains by doing this:
You can also apply a custom hosts file like this:
0.0.0.0 dns.google 0.0.0.0 one.one.one.one 0.0.0.0 dns.umbrella.com 0.0.0.0 rec1pubns1.ultradns.net 0.0.0.0 dns9.quad9.net 0.0.0.0 dns.google.com
And to really miss with it you can:
/sbin/iptables -i br0 -I FORWARD 1 -d 188.8.131.52,184.108.40.206,220.127.116.11,18.104.22.168,22.214.171.124,126.96.36.199 -p tcp --destination-port 443 -j DROP