OpenWrt alternative to Pi-hole for adblock and local domains?

Setting static IP for Pi-hole device did the work.

Here is the summary of the thread (I finally settled with Pi-hole):

  1. Question started with ask for an equivalent configuration for OpenWrt to setup adblock and custom domains. Because, as with any other router, pointing LAN DNS setting to Pi-hole simply didn't work. Our final goal is to configure those two.
  2. Someone willing to do it with OpenWrt can refer to this reply by @egc. Otherwise, at this point, we are going to configure Pi-hole to work in conjunction with OpenWrt. We will delegate task of DNS lookup and blocking, custom domains, as well as DHCP (yeah, Pi-hole can do that).
  3. Start by configuring static IP for the Pi-hole device. DON'T do this from the router's static DHCP lease. Set this on OS level. I found out that my network settings are managed by OpenMediaVault so I did it using OMV web UI, but there are other ways.
  4. Find and enable DHCP as seen in this picture. Configurations are pretty self-explanatory.
  5. Travel to DHCP settings for LAN on OpenWrt UI and set DHCP-Options to the Pi-hole's IP as seen in this picture. NOTE: 6, in start is important. Read more about DHCP-Options to know more.
  6. At this point, all 3 features we talked about would be working and be handled by Pi-hole. But there is one overkill here. You don't need OpenWrt doing DHCP stuff now. You can save on RAM by stopping dnsmasq process. Safe way for it is by disabling it on startup. Travel to http://<openwrt-ip>/cgi-bin/luci/admin/system/startup, find and disable dnsmasq, reboot the router.
1 Like