Raspberry Pi based router + pihole

I've successfully set up several piholes. And with a little help from some decent online sources, I've built a router / WAP around a Pi 4, that works pretty well. I'd like to combine the two, but there doesn't seem to be much documentation on how to install the pihole onto a Raspberry Pi-based router. This thread comes close: Can I run Pi-hole directly on my router? but still doesn't work. I'm think I'm lacking a key bit of firewall routing, but not sure.

Are there any suggestions on how to set up a WAP, and have it block ads for the clients that use the access point, all in the same box?

Setting up Pi-hole and a wireless access point (WAP) can be done one the same Raspberry Pi (RPi).

To be clear: I wouldn't recommend using any RPi as an all around router solution. (click for details)

Designating your RPi as your router will effectively force all traffic (as opposed to just DNS packets for Pi-hole) within your network to pass through your RPi, and your RPi lacks the dedicated hardware to deal with large volume data transfers.


Yet, this does not mean there aren't specific scenarios where running a WAP on RPi makes sense.

This is especially true when you deal with a limited number of clients only and/or happen to know the details of their communication behaviour, so you can be sure your RPi can handle the associated traffic.
I use such a WAP to fence my TV into a separate network on its own, rerouting all DNS traffic to Pi-hole at the same time.


A possible setup for a Pi-hole plus WAP configuration can be derived from one of my previous posts under Pihole plus Guest Wifi on different IP range - #16 by Bucking_Horn