Posted: Mon Apr 01, 2019 23:04 Post subject: Steps to bring Pihole to DD-WRT
So, I think there is a pretty common request to incorporate the pi-hole adblocking system directly into DD-WRT firmware.I started looking into this to see if it is possible, and if so, how much work it would be. (Keep in mind I'm not a lowlevel hacker by any means, so these observations might be completely out of touch with reality)
1) The Pihole team maintains a custom Dnsmasq fork called FTLDNS. It sounds like it consists of just a few minor changes applied to the original Dnsmasq source. As could be reasonably expected, their testing is limited to their target platforms (mostly the ARM chips in Raspberry Pis, so testing FTLDNS against any other hardware is outside the scope of Pihole). The first step in getting Pihole running on the router would be to compile FTLDNS for router hardware and make sure it runs. (I wouldn't expect too much difficulty here)
2) The next step would be to build DD-WRT to use FTLDNS instead of Dnsmasq. In addition to changing the executable, this might require some changes to how config files are stored and which files are modified by the admin UI.
3) The third step would be get the web based UI working. This seems like it'd be the most challenging step and might involve some tradeoffs. The Pihole UI has all kinds of logging and graphs which would be a pity to forego, but if the adblocking functionality worked it would be worth it. I'm not sure how the OpenWrt admin webapp works and whether it would be possible to port the PiHole UI to work within it, or if it would require a reimplementation.
Does this sound like it's correct ? Has anyone else investigated this enough to estimate how much work each of these steps would take?
Joined: 26 Mar 2013 Posts: 1858 Location: Hung Hom, Hong Kong
Posted: Thu Dec 10, 2020 23:49 Post subject: Re: Steps to bring Pihole to DD-WRT
ivar wrote:
1) The Pihole team maintains a custom Dnsmasq fork ....
May I remind you the possibilities of using recursive_dns Unbound? It does DNS over TLS if needed. It's not a bad idea to disable DNSmasq's DNS function and let Unbound be the only and forwarding DNS over TLS server. And Unbound can also take ad-blocking host lists!
Disclaim: I have no knowledge of Pi-Hole's DNSmasq fork.
_________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!
I use PiHole for my DNS as well. it would be nice to have more ways to use it. currently i am running a VM for Ubuntu and have PiHole running on a TrueNAS box. this is a great way to run it currently but having some sort of tie in or making it run on router hardware would be a way to simplify things.