Ad blocking with Raspberry Pi and Pi-hole
I actually have been doing some work with MaraDNS to have the ability to have a pi-hole sized blacklist.  The main source of pi-hole’s blacklist is this Git repo:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;StevenBlack&#x2F;hosts" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;StevenBlack&#x2F;hosts</a><p>That is about 60,000 hosts, so I added MaraDNS support to have up to 500,000 blacklisted names.  Since it’s a speed-optimized (not size-optimized) cache, each element takes about a kilobyte of memory, so a blacklist this size takes about 60 megabytes of memory for MaraDNS to store (on a modern Core i7 7600U processor, it only takes about two seconds to load all 60,000 elements in to memory), but it’s very rapid to use.<p>The script to take that blacklist and convert it in to a MaraDNS compatible format is here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;samboy&#x2F;MaraDNS&#x2F;blob&#x2F;master&#x2F;deadwood-github&#x2F;tools&#x2F;make.blacklist.sh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;samboy&#x2F;MaraDNS&#x2F;blob&#x2F;master&#x2F;deadwood-githu...</a><p>There are ways to make the memory footprint of the blacklist smaller, but this was a quick and simple way to implement a medium sized blacklist.  Finding ways to have, say, 10 million blacklist elements with a small memory footprint is left as an exercise for the reader.<p>My current project is to make a proper Docker container for MaraDNS.