-
Notifications
You must be signed in to change notification settings - Fork 100
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
Cloudflare DoT w/multiple requests = DNSSEC fail until connection closed #331
Comments
Strange behaviour indeed. How exactly does it fall over? Just AD-bit not showing in the response? Does the same thing also happen when you use 'dnssectest.sidn.nl' instead of 'google.com' ? I am just asking because 'google.com' does not give me the AD-bit in return (I have a similar configuration). But 'dnssectest.sidn.nl' does and answers more quickly. |
I'm not sure exactly, getdns just says DNSSEC validation failed and drops the response. google.com is just an example, it does it for every name. Here is a portion of the rather verbose debug logs when using dnssectest.sidn.nl:
Edit: and here's a successful single request for that domain:
|
I have also tried this on my openWRT device. It seems that there is always an answer either very slow or with a time-out. But I do have the AD-flag in the response. |
@uzlonewolf could you please try 'Zero configuration DNSSEC' with Stubby by disabling 'dnssec_trust_anchors', the 3 files (root-anchors.p7s ,root-anchors.xml and root.key) should appear in your appdata_dir. Recently I had some troubles with 'dig' after an update and had to force-remove the depending ssl libraries and reinstall them.
|
I have tried this, but I have had mostly slow responses like @hanvinke had, But I did see a servfail at some point. With Quad8 I have slower responses, but not as slow as with Quad1. Quad9 never gives me a slow response in this configuration. I'm not 100% sure, but I suspect there some kind of stricter rate-limiting with CF hampering the lookup of some of the records to do validation successfully. If that would be the case, some kind of caching mechanism (at least for the DNSSEC answers) would be the definite solution. |
With DiG 9.18.10 there seem to be improvements in speed and handling. I get a much quicker response from dnssectest.sidn.nl and no time-outs so far. // edit: still have slow responses or time-outs occasionally. A query to a non existing website gives me no SERVFAIL btw. |
I'm just using DiG to demonstrate how to reproduce the problem. In normal everyday use it is my web browser which is sending the multiple requests thereby causing stubby/Cloudflare to fall over. @wtoorop I'm actually using unbound to cache responses and redirect certain names, however if there is no cached entry then it sends everything (including multiple requests for the same name) straight through. |
So, I don't know if this is a Cloudflare, Stubby, or GetDNS bug, but when Stubby is configured to use only Cloudflare and multiple requests for the same name are sent, both of those requests plus every request sent after that point will fail. Things only start working again once the connection has been idle long enough to be closed.
Using this configuration:
I can reliably get it to fall over with:
Changing
round_robin_upstreams: 0
toround_robin_upstreams: 1
makes it take slightly longer, but it still happens if you run the above 2-3 times.Recompiling GetDNS with full debugging enabled shows that once the bug is triggered, every subsequent request over that TLS/TCP connection will result in a DNSSEC failure. Once that happens, Stubby/GetDNS just sits there and times out instead of retrying with the next server.
I have not tried DoH, but this does not happen with Google's DoT servers.
The text was updated successfully, but these errors were encountered: