Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdGuardHome dropping requests when using client is using unbound with TLS #2664

Closed
TommyKing opened this issue Feb 11, 2021 · 9 comments
Closed
Assignees
Milestone

Comments

@TommyKing
Copy link

as the title said, in the recent Update. i notice my Unbound TLS can't communicate with newest AGH in VPS., turn back to 0.104.3, the issue resolved by itself.

wierdly when using DNS feature in adguard Adblocker, it resolve well. i don't know what i should give you as i checked logs on vps, there's no important log regarding this. i checked /var/log

@ameshkov
Copy link
Member

To troubleshoot this issue we need to see AdGuard Home logs.

  1. Configure AdGuard Home to collect logs:
    • Specify log_file
    • Set verbose to True
  2. Restart AdGuard Home and reproduce the issue
  3. Post the log file here.

@ameshkov ameshkov added this to the v0.105.1 milestone Feb 11, 2021
@ameshkov ameshkov added the waiting for data Waiting for users to provide more data. label Feb 11, 2021
@TommyKing
Copy link
Author

Adg.log

here's the log. see the most recent one. it failed to resolve.

i can't test this on production server. i'll spin another server if you need some data

@ameshkov
Copy link
Member

@ainar-g

2021/02/11 09:15:01 6961#1199 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleTCPConnection(): error handling DNS (tls) request: talking to dnsUpstream failed, cause: client id check: client server name "" doesn't match host server name "xxxx"

@ameshkov
Copy link
Member

@ainar-g note that in unbound it is configured without any domain name:
forward-addr: "xxxxx@853"

Not sure how it worked before, does unbound verify the server cert?

@ainar-g ainar-g self-assigned this Feb 11, 2021
@ainar-g
Copy link
Contributor

ainar-g commented Feb 11, 2021

@ameshkov, that's client ID validation, and client IDs only appeared in v0.105.0. The assumption there is that valid clients always set server name in their requests. Apparently this assumption is too restrictive?

@ameshkov
Copy link
Member

Tbh, I don't think it's too restrictive, AGH works as expected. The only thing I don't like is the log message, it does not explain the problem (invalid SNI sent by the client).

@ameshkov
Copy link
Member

On the other hand, it's up to the client to verify the certificate, and we have StrictSNI setting to enable this behavior.

@ainar-g ainar-g added bug P3: Medium and removed waiting for data Waiting for users to provide more data. labels Feb 11, 2021
adguard pushed a commit that referenced this issue Feb 11, 2021
Merge in DNS/adguard-home from 2664-non-strict-sni to master

Updates #2664.

Squashed commit of the following:

commit e8d625f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Feb 11 14:46:52 2021 +0300

    all: imp doc

commit 10537b8
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Feb 11 14:30:25 2021 +0300

    dnsforward: do not check client srv name unless asked
@ainar-g
Copy link
Contributor

ainar-g commented Feb 11, 2021

Should be fixed as of snapshot 7e08565. Can you please check if our solution fixes the issue for you?

@TommyKing
Copy link
Author

yes fixed. thank you

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 2664-non-strict-sni to master

Updates AdguardTeam#2664.

Squashed commit of the following:

commit e8d625f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Feb 11 14:46:52 2021 +0300

    all: imp doc

commit 10537b8
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Feb 11 14:30:25 2021 +0300

    dnsforward: do not check client srv name unless asked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants