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

The default one Rpi4 (LAN:, WAN:
Isp router(telekom)
AGH admin ip is, DNS:

Yes AGH is installed on Rpi4...

If the RPis LAN IP is, then the AGH should listen on that IP, unless you have devices on the WAN/Telecom side which you want to utilize the AGH DNS for.

1 Like

You mean if rpi has on port 80, then should i use using port 8080 and dns as ?

port 80 is usually the openwrt web server port, and (probably) already occupied.

8080 is (probably) for the AGH admin UI, 5353 is (probably) the DNS port offered to your local dnsmasq as upstream DNS server, by AGH.

you've mixing ports and IPs, those are two separate things.

1 Like

I've been trying to aid him in sorting out this mess in my thread.
his problem is that the telcom router will not let him assign a different DHCP DNS so his adguardhome DNS on the pi can be used (the simplest option) He was using his ISP WAN DNS to point to his AGH DNS. Not recommended.

So what he needs is the pi properly setting up with DHCP and making it the "master" router downstream from his ISP router. However he is also using the pi to extend his network via another wifi ap point. Thats best i've made out so far.

(edit) it all started here

I reading reading that thread yesterday, didn't connect the dots though :confused:

Initially, the network needs to be set up right, before there's any point in looking into the AGH "issue".

1 Like

Re do the pi as downstream router and repeater to his 2nd wifi ap then he can do adblocking.
I was trying to avoid double NATing him but maybe simplest to just have the pi wan as dhcp off his ISP LAN with its dhcp and then have the pi LAN run its own dhcp off different subnet and then he can install AGH on the pi LAN side and solve it that way?

I would, think the learning curve's too steep ...


ok... now i think am getting how it works. i will try to redo the setup with Rpi4 and wifi AP, then i will install AGH. Thanks for your clarifications

1 Like

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.