Extended DNS adblock sinkhole
Most of us might have heard about Pi-hole and if not, check it out.
I chose not to use Pihole because pihole comes with a webserver, php etc and I just wanted a dns server.
So after a bit of research I figured that dnsmasq should do the trick.
It’s very simple to deploy and configure, comes with a low overhead and runs on all systems I might deploy. Since there are many opensource projects with this goal, there are twice as many block lists.
I searched the sources of popular projects for those lists and build a list with what I figured is good enough, based on the usage of the bigger projects. Then I wrote a little perl script which fetches those lists,
sanitizes the formatting and builds a big blocklist with the format required for dnsmasq.
For easy testing and building, I wrapped it all in a docker container.
I deployed it in a jail on my truenas server at home and it does all the dns filtering of my home and mobile devices for a few months now. As of today, there were no issues, no performance problems, no necessary updates etc. (apart from the periodically renewed blocklist)
Pihole requires much more maintenance due to its nice and handy user interface, which is something I don’t care about.
A cronjob keeps the block list up to date, and as long as there are no ads on my mobile devices, I’m happy.
See the GitHub repo if you wan’t - but keep an eye on the GPLv3 parts of the project.
techfunkadmin/dnsmasq_adblock