Example unbound.conf

I'm going to drop this here for anybody else that might find it useful. It's a bit overkill as far as caching goes (the cache is likely huge for the relative use), but it works extremely well.

I presently have Charter as my ISP, and their network hardware is so bad that if you try and open more than 20 or so connections simultaneously, the routermodem chokes out. This results in a massive number dns lookup failures (and connection timeouts) even when using, say, google's dns servers. With the number of tracking scripts, images, and other resources on webpages these days, it mostly just doesn't work. Every page you view has probably partially failed in some way. So, as part of my stop-gap measure, I cache DNS. Here's how.

Short explanation: It has decently large caches for the different parts of dns lookups and responses, and when a record is nearing expiration it preemptively looks it up again (that way your local cache is hopefully always fresh and giving you sub-millisecond responses). It will listen on all interfaces (ipv4 and ipv6) to local network requests (in my case, 192.168.*). And some hardening stuff that I'm sure is useless on a local network, but I figured why the heck not.

Any recommendations? More or less cache, and of what kinds? Any other tunables I should know about? Otherwise, hopefully this helps someone. ♥