What's new

AdGuardHome Few questions about AdGuard Home Install Script

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

The cache you are talking about is the one that is activated during the installation phase by answering "Y" to the question ( Do you want to run AdGuardHome as a local caching DNS service which includes router traffic?) ?
Because i selected "N" and as i understand not using unbound for a simple configuration it is better to activate it.
 
Last edited:
Once Unbound builds the cache AGH is fed with under 1ms responses. With or without middle cache the result is the same. Middle cache because the browsers keep DNS cache as well. If there is a difference - not easily user measurable.

I’ve run it in all configurations and the fastest all the time was Google upstream and AGH with its cache enabled. Nothing beats big public DNS servers cache. Google, OpenDNS and Cloudflare are the fastest in my area.
The noticeable difference comes from you not using the cache for a query that is typically issued a blocked response meaning AdGuardHome would have to work harder to block since it will not cache its own blocked responses. Unbound is not caching the blocked responses from Adguardhome. Therefore, Unbound cache is only benefiting the queries AdGuardHome does not block. No different from you querying goggles, cloudflair, or squad9. You would intentionally be causing AdGuardHome to perform poorly at what it is designed to do, all so it wont cache the unblocked answers from Unbound Cache. When you use goggles, cloudflair, or squad9, do you turn off AdGuardHomes Cache then so you could benefit from their upstream cache more?
 
Last edited:
The noticeable difference

No noticeable difference observed.

When you use goggles, cloudflair, or squad9, do you turn off AdGuardHomes Cache then so you could benefit from their upstream cache more?

No, because it becomes my first local cache. Upstream server cache is 20ms, local is 1ms. When Unbound is used "upstream" cache for AGH is 1ms. With or without AGH cache enabled the response is still 1ms. Even if AGH cache is helping with something - the user can't measure under 1ms difference.
 
I can measure it at least. Under 1ms I can’t. If you run DNS speed test the DNS servers get tons of requests including the local one with its cache. With Unbound feeding AGH the result is all the same with or without AGH cache.
 
The cache you are talking about is the one that is activated during the installation phase by answering "Y" to the question ( Do you want to run AdGuardHome as a local caching DNS service which includes router traffic?) ?
Because i selected "N" and as i understand not using unbound for a simple configuration it is better to activate it.
This is what I have my cache set to on AdGuardHome
1682049958458.png
 
The cache you are talking about is the one that is activated during the installation phase by answering "Y" to the question ( Do you want to run AdGuardHome as a local caching DNS service which includes router traffic?) ?

This question is not about cache, but about DNS service. The answer is Yes.

This is what I have my cache set to on AdGuardHome

DNSSEC authentication fails with Optimistic caching enabled. At least on this test:

 
This question is not about cache, but about DNS service. The answer is Yes.



DNSSEC authentication fails with Optimistic caching enabled. At least on this test:


1682052522405.png

It shows it has been Verified with DNSSEC in Query log.

1682052480645.png

It shows it is responding from cache with the RRSIG data intact.

Last, Your website works!

1682051425018.png


It sounds to me you are running into a problem where there is an issue between unbound+dnssec and adguardhome+dnssec. Unbound does a deep verification that sometimes does not behave when using dnssec on a pihole or an AdGuardHome. It is typically because Unbound strips away (or randomizes) too much information from the query response before it is sent to the client ( in your case, to adguardhome). Then AdGuardHome attempts to do the verification again, however there is too much info removed already. For example, in the pihole +unbound guide these are the only options adjusted for DNSSEC between unbound and pihole

Code:
    # Trust glue only if it is within the server's authority
    harden-glue: yes

    # Require DNSSEC data for trust-anchored zones, if such data is absent, the zone becomes BOGUS
    harden-dnssec-stripped: yes

    # Don't use Capitalization randomization as it known to cause DNSSEC issues sometimes
    # see https://discourse.pi-hole.net/t/unbound-stubby-or-dnscrypt-proxy/9378 for further details
    use-caps-for-id: no
 
Last edited:
This question is not about cache, but about DNS service. The answer is Yes.
Actually, the user was getting the two intertwined, thus he did not understand any of it.

1682053450019.png


For adguardhome, You can modify the cache value here:

1682053575304.png


the default value is "4194304bytes" or "4mb" I chose "524288bytes" which is approximately 1/8th the default size. I noticed alot less strain on my RAM at this size (it is still using alot of ram, but the demand dropped). A good amount of cache typically ranges in sizes from 524288 to 2097152 bytes. The fact that AdGuardHome uses 4194304bytes is a bit overkill incomparison the the amount memory it already demands.
 
Last edited:
No noticeable difference observed.



No, because it becomes my first local cache. Upstream server cache is 20ms, local is 1ms. When Unbound is used "upstream" cache for AGH is 1ms. With or without AGH cache enabled the response is still 1ms. Even if AGH cache is helping with something - the user can't measure under 1ms difference.

Surely using AGH cache alongside Unbound cache would be quicker and reduce the number of hops required over time?

E.g a request that isn’t cached in AGH or Unbound would go:

Client>AGH>Check Blocklist>Check Cache>Unbound>Check Cache>Root Servers>Unbound>AGH>Device

A cached request in Unbound would go:

Client>AGH>Check Blocklist>Check Cache>Unbound>Check Cache>AGH>Device

Whereas a cached request in AGH would go:

Client>AGH>Check Blocklist>Check Cache>Device

Does that look right?
 
View attachment 49479
It shows it has been Verified with DNSSEC in Query log.

View attachment 49478
It shows it is responding from cache with the RRSIG data intact.

Last, Your website works!

View attachment 49477

It sounds to me you are running into a problem where there is an issue between unbound+dnssec and adguardhome+dnssec. Unbound does a deep verification that sometimes does not behave when using dnssec on a pihole or an AdGuardHome. It is typically because Unbound strips away (or randomizes) too much information from the query response before it is sent to the client ( in your case, to adguardhome). Then AdGuardHome attempts to do the verification again, however there is too much info removed already. For example, in the pihole +unbound guide these are the only options adjusted for DNSSEC between unbound and pihole

Code:
    # Trust glue only if it is within the server's authority
    harden-glue: yes

    # Require DNSSEC data for trust-anchored zones, if such data is absent, the zone becomes BOGUS
    harden-dnssec-stripped: yes

    # Don't use Capitalization randomization as it known to cause DNSSEC issues sometimes
    # see https://discourse.pi-hole.net/t/unbound-stubby-or-dnscrypt-proxy/9378 for further details
    use-caps-for-id: no

I use AGH and Unbound on a RPi and I don’t seem to pass all the DNSSEC requests, only the one:

IMG_3319.jpeg
 
I use AGH and Unbound on a RPi and I don’t seem to pass all the DNSSEC requests, only the one:

View attachment 49485
Yep this is an specifically and Unbound and AdBlocker issue. I use Unbound along side Pihole, and my results are identical to this.
1682062438560.png


So there is no Official "issue" with adguardhomes optimistic caching, this is strictly related to the interaction between forwarding request from between an adblocker resolver (e.g. pihole and adguardhome) and unbound. (maybe even a specific behavior exclusive to unbound)

I am beginning to think this specifically relates to how unbound is compiled:

1682063107136.png
 
Last edited:
Surely using AGH cache alongside Unbound cache would be quicker and reduce the number of hops required over time?

E.g a request that isn’t cached in AGH or Unbound would go:

Client>AGH>Check Blocklist>Check Cache>Unbound>Check Cache>Root Servers>Unbound>AGH>Device

A cached request in Unbound would go:

Client>AGH>Check Blocklist>Check Cache>Unbound>Check Cache>AGH>Device

Whereas a cached request in AGH would go:

Client>AGH>Check Blocklist>Check Cache>Device

Does that look right?
yes bingo. So this issue is not exclusive to AdGuardHome, or Pihole. Just to unbound when used in conjunction with the two. To be honest, I dont consider it to be a game breaking issue. After-all it is only one test.

1682064318914.png
 
Last edited:
Yep this is an specifically and Unbound and AdBlocker issue. I use Unbound along side Pihole, and my results are identical to this.
View attachment 49486

So there is no Official "issue" with adguardhomes optimistic caching, this is strictly related to the interaction between forwarding request from between an adblocker resolver (e.g. pihole and adguardhome) and unbound. (maybe even a specific behavior exclusive to unbound)

I am beginning to think this specifically relates to how unbound is compiled:

View attachment 49487
OK - good to know it's not just me and something with my setup then!
 
yes bingo. So this issue is not exclusive to AdGuardHome, or Pihole. Just to unbound when used in conjunction with the two. To be honest, I dont consider it to be a game breaking issue. After-all it is only one test.

View attachment 49488
I'd rather have stuff cached in AGH in the first instance, although once it's cached in Unbound I suppose there's a couple less hops for it to do going out to the Root DNS servers and back again.. so no real biggie I guess?
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Top