Need help configuring ISP router with Rpi4 with Openwrt, Adguardhome and finally WiFi Accesspoint

I somehow tried to follow up your guide. One thing i made out and its very clear that without a dhcp server on wan interface in rpi4 , i have no internet connection.
What you said is WAN setup on rpi4 is not at all needed. But without WAN (only as dhcp) i dont get internet.
So my best working setup is as follows.
Isp ip
Rpi4 lan
Rpi4 wan, as assigned automatically from telekom router)
AGH setup on - here internet works but adblocking is not 100%

I have set primary dns in isp router to and disabled dhcp on isp router. Instead enabled dhcp on AGH with ip range from to 200 with default gateway of

If i make any changes to this setup i lose internet and with this setup i still see ads. Ofcourse i added in dhcp&dns settings of rpi4.

What am i doing wrong. Why i cant get 100% adblocking which i was easily getting before by default( without fiddling too much with changing ip addresses )?

Lan is not allowing me to set it up as dhcp but only static. If i try, network breaks and i dont have internet

WAN should be dhcp client, LAN - static.

Get that to work properly, then start messing with AGH.

1 Like

yes buddy. i finally got it. i got the setup working till WAN(DHCP) and LAN(Static). After that when i install AGH on WAN ip address(in my case its not blocking the Ads 100%.
Thats where i am getting irritated. i dont know what wrong i did. Before it used to work by default.

Haven't used AGH myself, but which ads aren't blocked ?
youtube ads for instance, are hard to block, based on DNS names.

no no no, i am not talking about youtube ads. but in website on top and also at the bottom i am still seeing the Ads...its very frustrating you know that previously it used to work by default and now i am digging every possible way to make it work...horrible experience from the past 3 days...

then find an ad hoster that isn't blocked.

change to DoH in your browser, to bypass the local AGH, see if it works, if you go directly to AGH.

ok, i have now changed my ISP Router IP Address to
Rpi4 took as usual as its default static address.
WAN Ip in Rpi4 took Address with DHCP Option.
Now when i install AGH should i just use 10.30... series IP Address or 192.168.. IP Address.
If i will be using 10.30.. IP Address to Setup AGH, should i add it as Primary DNS in my ISP Router ? and also in DHCP/DNS Settings in Rpi4 as DNS forwarding with ignore resolv file being checked ?

Will it be the right way to do so or do you sense it is not going to work ?

I have no idea what you're doing, and why you're doing it ...

ok, just tell me why my ads are not being blocked by AGH ? if you want i can upload you the Pictures of my Settings, then you can understand it better..

I hope you get a picture now of what i am trying to say or atleast do. All i want is those Ads displayed in the Websites to be completely gone. I am using AGH and you can see that some Ads are blocked but not all.
I need a solution to block all the Ads.

no idea, it's your set up ...

did you disable DoH in your clients browser ?
if using an android device, did you disable DoT ?
are you intercepting & redirecting all outgoing client DNS calls in the fw ?
did you install BanIP to stop all outgoing DoH requests ?

if you want to block "all" ads, install an adblocker in your browser.
even that won't be 100% free from ads, but it's as close as you can get, closer than AGH.

or stay offline.

1 Like

simplest answer would be for him to replace his crap isp router with an openwrt capable one and then install AGH. His chaining of his ISP router to his pi and then downstream to another router is the main issue, and i only have his network semi figured out. i asked him to draw it out so we'd have a better understanding. He'd have better luck reinstalling his pi with ubuntu and using it as a server instead of trying to use it as a router behind his isp router.

if he wants to keep using his isp router then he needs to set it so his ISP router does its own ISP DNS or google or cloudflare. Then he should setup the pi so it takes a dhcp on the wan downstream from the ISP router and then setup his pi lan to be DHCP and configure AGH here. He'll just be double natted and have to live with it.

I did try to get him to try "flatten" his network to a single subnet but whatever happened it didnt work.
Its all in here.

well, it doesn't help if you're all over the place, without any understanding of what you're doing, and why you're doing it ...

1 Like

Ok. I will have to live with banip+ adblock +dnscrypt proxy2 setup for now. I dont know hiw it was working before with the same isp router and sane method of installation and now its troubling me to the max ....

I agree i am a noob in Networking, i am not an engineer. But i tried to understand and let other experts here know what i am facing in common language. Forgive my computer ignorance and thanks for your valuable time.