Pi router with pihole - internet from wifi, routed to ethernet

Hi everyone,

I’m looking for some advice on how to achieve the above. I’ve trying to set this up for days and I still cannot managed. I’ve read good info here:

and here:

but just cannot make both work together.


I get internet from my landlord wifi via dhcp. gives me the connection.
I’ve got a mac mini connecting to this network, get a 192.168.1.X IP address on the wireless interface and then the macos internet sharing is doing the rest so I have full connectivity on the ethernet form the mini which deal with dhcp and routing on Also have an AP ( giving my personal wifi access for phones/tablet access to internet and local NAS routing etc…


I would like to replace the mac mini with the pi running pihole.

So right now I have:
landlord wifi -
mac mini - dhcp connect to wifi and share connection to

So as not to risk bugging off by landlord wifi while experimenting, let’s run it where the pi connect to my AP on wifi, get a dhcp address in 192.168.2.X, and distribute connectivity on the eth interface ( Anything coming from this should run through pihole.

Everything I tried so far is I either get the pihole hole working or the routing working (very usefulscript here : https://github.com/arpitjindal97/raspbian-recipes/blob/master/wifi-to-eth-route.sh). Impossible to get both.

I’ve been resinstalling the pi a few times…

It should be simpler than above as I should not have to mess with hostapd, but still cannot make to work. Would anyone have an idea/advice on how to do this properly ?

This is what I’m looking to achieve with pihole on the raspberry: