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:
address=/cloudflare-dns.com/ address=/dns.google/
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 8.8.8.8,8.8.4.4,1.1.1.1,1.0.0.1,9.9.9.9,149.112.112.112 -p tcp --destination-port 443 -j DROP
Comments
Post a Comment