So, let’s have a DNS server which, if it sees a given IP in the DNS reply, blocks the resolution of this IP. Actually, MaraDNS’s recursive resolver <i>already</i> has that feature, because, back in 2009, it solved a security problem: There are security issues with those “this host name was not found, look at our ads” websites many DNS resolvers point to instead of giving a NXDOMAIN the way they should.<p>Indeed, I just looked at the source code, and since MaraDNS uses a hash to look up rogue IPs, this list can be arbitrary long with only memory usage going up. Because these kinds of rogue IPs are (were) rare, there is a hard-coded limit of 1,000 IPs in the source code, but that’s a one-line patch to increase to 10,000 or even 100,000 max bad IPs.<p>The syntax in one’s dwood3rc file to have this feature is this:<p><pre><code> ip_blocklist="10.6.6.6, 10.1.2.3, 10.5.4.3"
ip_blocklist+=", 10.6.0.6, 10.1.6.9"
</code></pre>
(Replace 10. IPs with the real IPs of rogue tracking sites)