#AdGuard addon isn't listening to my devices - it is listening to my router instead

1 messages · Page 1 of 1 (latest)

prisma prawn
#

So as I was installing HA, I decided to get rid of Pi-Hole on a separate Raspberry Pi and just try and integrate AdGuard on Home Assistant instead. I followed the instructions and used the Home Assistant IP adress as the DNS adress in my router, but then this problem showed up. I don't really know how to fix it but I know for sure this shouldn't be happening.

split pike
#

I have no idea what your title is supposed to mean. Can you elaborate and show what you see?

prisma prawn
agile kestrel
#

Your question is still unclear. That's a screenshot of the addresses AdGuard is listening on, which you presumably updated your router to serve as a DNS server via DHCP (keep in mind there IS a difference between the DNS servers your router uses and the ones it serves via DHCP, and are typically 2 separate settings).

If you updated the router's DNS servers and not the DHCP served ones, it'd look like all traffic is coming from your router.

Are you saying you're not observing your devices use it?

#

If you go to "Query Log" in AdGuard, you can see all of the requests made to it, along w/ the client IP

prisma prawn
agile kestrel
#

You'll likely need to restart (easiest approach) your devices to get the new values from DHCP

prisma prawn
#

So I'm a bit confused then... what do I need to do with DHCP?

I changed my primary DNS server in my router to be the local IP of HA (192.168.x.x). I didn't change the secondary DNS server in my router though. That's the only thing I changed within my router as I thought that was the thing you're supposed to do.

agile kestrel
#

So, if you just changed your router's DNS server, then DNS requests that are pointed to your router will primarily use AdGuard

#

DHCP is one way to hand out DNS servers to your clients, if you use DHCP to assign IPs to your network

#

Are you using DHCP? If so, you likely want to specify your AdGuard IP for DHCP's DNS servers

#

If not, you'll need to configure your clients to hit AdGuard

prisma prawn
#

I see my HA listed within my router here. That means it uses DHCP right?

split pike
#

Secondary DNS server doesn't necessarily mean that it will not be used if the first one works.

prisma prawn
#

(i am a bit of a noob)

#

I also see that DHCP is set to on within my home network

split pike
#

I recommend switching the order around. Make Adguard ask your router and give the Adguard server via DHCP from your router. The router iself uses a public DNS for its upstream.

prisma prawn
#

If I switch it around does that mean go to DHCP settings and create a static lease?

#

Within AdGuard on HA

split pike
#

This has nothing to do with leases.

prisma prawn
#

Okay

split pike
#

The way you do it right now is client > router > adguard > public DNS. Adguard will only see the router asking it.
You also won't be able to resolve hostnames of your DHCP clients in your router's DHCP table like this.

prisma prawn
#

Which client?

#

Router or HA?

#

I might need a screen for this, sorry 🥲

split pike
#

When a device (client) asks for a DHCP lease from the router the router stores it in its DHCP table. Its own DNS server can usually resolve these client names to their ips.

#

Hmm. Actually it might still work. Still. You want the client to ask adguard themselves if possible.

prisma prawn
#

How would this "normally" be configured?

split pike
#

In your router you make the upsteadm 1.1.1.1 or something. In the DHCP setting you make the DNS Sserver the ip of your adguard.
In adguard you make the upstream the ip of your router.

#

When a device requests a DCCP lease from your router it gets the adguard ip as DNS. When it asks adguard, adguard asks your router and it asks 1.1.1.1.

#

But as I said, some devices don't use the DNS server you give it. SOme browser use piravaty DNS and stuff like this. You can only really fix this with a proper router than can do firewalling such as pfSense/opnSense.

#

Also if a HAOS update fails you will have a bad time so you want redundancy for your adguard.

prisma prawn
#

I think I might've missed configuring the upstream part... but I'm struggling with the verbs being used on a dutch router

split pike
#

It's unlikely to be called upstream in your router. I just don't know what else to call it.

prisma prawn
#

Would it matter if this was configured on a modem rather than a router or does that not make any difference?

split pike
#

Maybe.

#

Where I'm from when people say router they usually refer to a router modem combination.

prisma prawn
#

In that case I might try later when I migrated everything to a router. (not that I just found out that I connected every to a modem but it was more of a lazy factor when I moved in here)

#

My modem doesnt seem to have anything related to an upstream setting after I set the language to english

split pike
#

Feel free to share some screenshots. It will likely be a matter of enabling advanced mode and spelunging in the interface though.

prisma prawn
#

Where should the upstream setting be located? Within DHCP settings?

split pike
#

Depends on the router. No. Probably not.

prisma prawn
#

DNS?

split pike
#

I can't really tell you. I don't even know your modem model.

prisma prawn
#

It's a KPN Experia Box 12b

split pike
#

They don't see to have a extensive manual for it.

prisma prawn
#

"Use other DNSv4 device" is what it says on the panel

#

So the modem uses it

split pike
prisma prawn
#

So that's where I put the 1.1.1.1?

split pike
#

So in first picture use 1.1.1.1 or something and in second picture se the adguard ip.

prisma prawn
#

Alright, checking

#

Does it need a restart or would it work right away?

#

I just opened some sites and it doesn't seem to log queries still

split pike
#

Your client has to ask for a new DHCP lease.

prisma prawn
#

So I restart my device?

split pike
#

Which OS?

prisma prawn
#

Windows 11

split pike
#

ipconfig /release and then ipconfig /renew in the terminal might work.

#

ipconfig /all should tell your the DNS server.

prisma prawn
#

So the DNS looks correct, but there doesn't seem to be query logging still after surfing to youtube.com

split pike
#

No that is not correct. It should only be the adguard ip, NOT 1.1.1.1.

prisma prawn
#

Hmm.

split pike
#

You might have to set both primary and secondary to the same ip.

prisma prawn
#

Alright now it is only the IP of HA

#

It disconnected me from the internet

split pike
#

What does nslookup google.com say now?

#

By the way according to your picture that is not the adguard ip

prisma prawn
#

I changed the DNS server back 1.1.1.1 after internet disconnection

split pike
#

.>

prisma prawn
split pike
#

Alright try this then

nslookup google.com 192.168.2.102
nslookup google.com 192.168.2.17
prisma prawn
#

Both of them time out

split pike
#

Hmm. Can you try to reboot HAOS and then try it with the ip of the HAOS device again?

prisma prawn
#

Would it matter if I reserved an ipv4 address for the HA device?

#

Because that's currently the case

split pike
#

Depends if HAOS uses DHCP and if the ip is different than what we tested with above.

prisma prawn
#

The reserved address is x.x.2.102 which is still the current address according to my modem

#

(also after restart)

split pike
#

Reboot so everything is restarted.

prisma prawn
#

Also I restarted my modem

split pike
#

Then that lease isn't really helpful here to ascertain which ip it uses.

#

Please check ha network info.

#

What we do here isn't related to your modem's DNS setting as we directly ask a specific nameserver.

prisma prawn
split pike
#

Should be .102 then.

prisma prawn
#

So set primary and secondary DNS back to .102 on my modem? Do I just need to wait longer?

#

My suspicion right now is that it is because I am configuring this on my modem than a router after all

split pike
#

Let's ignore the modem for now. Adguard needs to work and respond first.

prisma prawn
#

So replace the 1.1.1.1 in my modem?

#

Or within HA

split pike
#

Ignore the modem. Make sure the adguard addon is running and check what it says on its Setup Guide tab.

prisma prawn
#

(Still very grateful for your help, sorry for keeping you here this long 🥲 )

#

It is running and this is currently the setup guide tab

split pike
#

I wonder where the 2.17 comes from.

#

According to your network info the ip is 2.102.

prisma prawn
#

It could be my router. Basically everything is connected to my modem, but I have a router that I use for guests

split pike
#

.17 would be a weird ip for a router and the process cannot listen on a ip that isn't locally available.

prisma prawn
#

It's not a connected device on my modem either

split pike
#

My HAOS has issues at the moment so I can't really test this myself.

prisma prawn
#

It feels a bit confusing but I guess I don't have the luck for this to work as it should have

#

(because I'm pretty sure this can work really well 😛 )

#

But my current logic for this problem is that if I configure the DNS on my modem towards the HAOS, then it will no longer use the connection to the internet and rather just search for domains on my HAOS server - which there aren't any. Which is why I might need a router inbetween my modem and the HAOS server

#

Would that make sense?

split pike
#

Adguard will defer to its upstream if it can't answer the query.

#

The issue at hand is that none of the ips respond to DNS queries though.

#

Can you restart Adguard via the GUI and see if the setup guide still shows the .17 ip?

#

I'd also like to take a look at the addon logs.

prisma prawn
split pike
#

Can you share ip a?

prisma prawn
#

I dont know if there is any sensitive info in here

split pike
#

I'm thoroughly confused. There's no 192.168.2.17 and the local ip of the container should be in a different subnet.

#

You can also check this

apk add iproute2-ss
ss -lntp | grep 53
prisma prawn
#
fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz
(1/2) Installing libmnl (1.0.5-r2)
(2/2) Installing iproute2-ss (6.15.0-r0)
Executing busybox-1.37.0-r19.trigger
OK: 261 MiB in 247 packages
LISTEN 0      0                                     0.0.0.0:5355       0.0.0.0:*                                  
LISTEN 0      0                                   127.0.0.1:53         0.0.0.0:*                                  
LISTEN 0      0                                192.168.2.17:53         0.0.0.0:*                                  
LISTEN 0      0                                 172.30.32.1:53         0.0.0.0:*                                  
LISTEN 0      0      [fd4e:3732:3232:0:f85f:7d56:41b5:26de]:53               *:*                                  
LISTEN 0      0                                           *:5355             *:*                                  
LISTEN 0      0      [2a02:a44e:da53:0:2660:8c89:296d:2f81]:53               *:*                                  
LISTEN 0      0                 [fe80::9fd4:6ceb:528a:1578]:53               *:*                                  
LISTEN 0      0                                       [::1]:53               *:*  
split pike
#

So it definitely listens there but I don't understand why.

prisma prawn
#

It should be .102 instead right?

split pike
#

Yep.

#

I'd consider a uninstall and reinstall of AGH.

prisma prawn
#

Alright. I will try this tomorrow as I am running out of time. Thanks a lot for your help 🙏 very appreciated

prisma prawn
#

Well after some little tinkering I got it fixed! I reserved the ipv4 address to be .17 instead and rebooted HAOS.

split pike
#

I'd love to understand why it used that ip though.

prisma prawn
#

I have one theory but I don't know if it's the correct one. When I restarted HA before, I didn't fully restart the system in advanced options which might've caused the behaviour with the IP to use the IP before I reserved the local IP to HA

#

I kind of just discovered that option today

#

At first I though restarting HA would restart the system but those are separate things

split pike
prisma prawn
#

Thanks, that looks really useful