So pihole is just some nice tooling around dnsmasq to feed it a bunch of domains to block, but if you don't care about that you can just have have a script download a hosts file and load it into plain dnsmasq (or whatever DNS server you like; with dnsmasq use `addn-hosts=/etc/hosts.d`). Bonus: lots of routers already use dnsmasq, so you literally stick that line in the config file and populate the hosts file(s) and bam, free adblock.
Wow, thanks! I had no idea this type of thing was possible these days. I was about to ask how you'd make that hosts file but found this in my router admin panel: 'Remote Console enables SSH access into the router from a WAN connection using the modems WAN IP address.'
I do have a pihole set up and I like the web interface for it, but I look forward to playing around with this for fun.
These days? If anything, these methods are increasingly mitigated by new functionality from your friendly global technology giant such as dns-over-https.