How to Use Pi Hole on your OpenWrt Router

Back then, I published a tutorial on how to configure Pi Hole on pfSense, it did actually attract a good amount of traffic from the web to this blog. Well, since I started using my old OpenWrt equipment in my Homelab again there's going to be a new post.

I decided to write this article to help beginners who have installed Pi Hole on a VM or maybe some other network device and don't really know how to configure thier OpenWrt router properly with Pi Hole as the primary DNS server.

The big idea is simple, once we are finished, any client device on your network that connects to your OpenWrt router device with DHCP is automatically assigned with the Pi Hole address as DNS.

Determine IP Address Information

Now, I suppose you have to determine the IP addresses of both:

  • OpenWrt Router
  • Pi Hole VM or Network Device

Please make sure you have assigned a static IP address for the Pi Hole server.

Configure OpenWrt Router with Pi Hole

From your OpenWrt web control panel which happens to be on this address https://192.168.1.1 in my case. Please proceed from the menu above to Network > Interfaces where you should find this:

Our target for this implementation is the LAN interface, go ahead and click on "Edit" the blue button where you will arrive at the following window as a result.

Please refer to the image above and make sure you navigate to DHCP Server > Advanced Settings then just add the Pi Hole IP address which is 192.168.1.10 in my case right into the DHCP-Options but make sure it's in the this shape 6,192.168.1.10 instead. After that, simply click on "Save" the green button.

Okay, from the interfaces page find the "Save & Apply" the blue button down below and click on it, now that everything is saved I recommend that you restar your OpenWrt router just in case. You can do that from System > Reboot in the menu above.

That's it, now you can proceed to the final step which is confirming everything is working as intended.

Ensure Pi Hole is Working

Go to your Pi Hole admin panel which is in my case hosted on this address http://192.168.1.10/admin/ then you should open a web browser on any of your OpenWrt router client devices, try visiting any website and observe what's happening on the Pi Hole admin panel overview.

If you can see live information about the DNS queries that Pi Hole server is receiving while surfing the web on your client devices, that indicates everything is configured properly.

Speak Your Mind

Connect

If you like our content, please consider buying us a coffee.
Thank you for your support!

Explore

Discussion