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

The default one Rpi4 (LAN:192.168.1.1, WAN:192.168.2.2)
Isp router(telekom) 192.168.2.1
AGH admin ip is 192.168.2.2:8080, DNS:192.168.2.2:5353

Yes AGH is installed on Rpi4...

If the RPis LAN IP is 192.168.1.1, 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 192.168.1.1 on port 80, then should i use 192.168.1.1 using port 8080 and dns as 192.168.1.1:5353 ?

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

https://forum.openwrt.org/t/how-to-updated-2021-installing-adguardhome-on-openwrt/113904/155?u=mercygroundabyss

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 ...

2 Likes

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 192.168.2.1
Rpi4 lan 192.168.1.1(static)
Rpi4 wan 192.168.2.2(dhcp, as assigned automatically from telekom router)
AGH setup on 192.168.2.2#5353 - here internet works but adblocking is not 100%

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

If i make any changes to this setup i lose internet and with this setup i still see ads. Ofcourse i added 192.168.2.2#5353 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 192.168.2.2) 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 10.30.10.1
Rpi4 took as usual 192.168.1.1 as its default static address.
WAN Ip in Rpi4 took 10.30.10.2/24 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.