-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support edns-tcp-keepalive EDNS0 Option - RFC7828 #3778
Comments
It took me a long time to find this post and the solution to my problem: using DoT on an Asus router with Merlin firmware, I would always hit the same problem you described, where pointing to NextDNS works flawlessly. Upon implementing your solution, I was able to restore the connection with my AdGuard server. So first, thank you for your post, and second, I concur with your proposition to add the support for edns-tcp-keepalive ! |
I am running AdGuard Home on a VPS and Asus RTAX88U running Merlin firmware 386.3.2 I am unable to get AdGuard Home working on Asus Router when using Beta/Edge version (while NextDNS works without any issue). 1) Could you please elaborate how you fixed this issue? What changes did you make on the Asus Router? Which files/ scripts to edit/ add?
Do you have the same issue? |
Hi @gspannu, I created the post-conf script for Stubby (/jffs/scripts/stubby.postconf) with the following content:
You don't need the Do not forget to add the execute bit to your script: P.S. : I assume you already have a USB key and external JFFS scripts support enabled, and that you can connect to your router through SSH |
Thanks for your response. Another quick query if could help me.
AdGuard complains about chain of trust when adding the certificate, but if I copy my self-signed/ self-generated RootCA to /etc/ssl/certs path, then the self signed certificate is accepted by AdGuardHome. To test that my self signed cert is actually working on DoT/ DoH...
Q: How do I copy this RootCA to Asus Router? |
You can copy you cert in your /jffs partition (for example /jffs/mycert/mycert.pem) and use a binding mount with the /etc/ssl directory :
You should now see your cert in You can automatically do this during the router boot phase, by editing the file |
You are a star.... Thanks. |
Not really: miekg/dns#1317 @ainar-g if the PR does not get merged until we release AGH, I suggest adding a replace to go.mod. |
@ameshkov Thank you for digging even deeper and for creating a PR to upstream. Spotting / fixing this exceeded my skills. 😄
👍 |
@rskallies, the latest |
Yes it does. 👍
Still wonder why dnsproxy does not connect via QUIC - would prefer to use Adguard dnsproxy instead of Stubby on this MIPS based router. I'll create another issue with more information later. |
Thanks for testing! I'll close this issue then. I've left a TODO in the code to switch back to the original library once the PR is merged there. |
This one is strange. Do you specify the port number when running dnsproxy? |
Yes Log on the Adguard Server is showing "got error when accepting a new QUIC stream: timeout: no recent network activity" Log on the client (dnsproxy v0.39.13) is showing "[debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpHandlePacket(): error handling DNS (udp) request: talking to dnsUpstream failed, cause: failed to open QUIC session to quic://fully.qualified.domain:784, cause: timeout: handshake did not complete in time" Seems I need to enable debug on the server and see what is logged then. |
Hm, it looks as if something is wrong with UDP to port 784 in general. As if it's dropping packets somehow. |
I disabled any firewalling on both sides, changed UDP port with no success. And interestingly it also does not work with DoT. Using same dnsproxy version from a client behind the router does work for both DoQ / Quic and DoT for the same AdGuard server. Really strange. I'll try to debug this using tcpdump on both sides. |
Confirmed. The issue is now fixed in v0.107.0-b.16. 👍 Just tested and removed the post.conf script for Stubby in Asus Merlin Router, all works as expected. |
Problem Description
Using latest stubby / getdns as DOT client is not possible without running stubby with the option idle_timeout: 0 because
on the AdGuard server side the edns-tcp-keepalive EDNS0 Option seems not to be parsed. Instead the server logs
[info] error handling TCP packet: dns: buffer size too small
Proposed Solution
The project already use the https://github.com/miekg/dns/ Go library already which supports this feature.
It would be nice either to support this also or at least emit a proper error message if such option is requested by a client and the server cannot handle this feature.
It took me a while to get this figured out and to get a Stubby client working.
The text was updated successfully, but these errors were encountered: