Closed cdemi closed 1 month ago
Thanks for the post. Yes the DoT/DoH connections are pooled and it may take few seconds for the DNS client code to realize that the connection is not responding before it can try to make a new connection. This is kind of expected with connection oriented protocol but usually the opposite party will respond with a RST packet which causes the connection to get dropped immediately while it seems that in your case, the server is just dropping those incoming packets due to IP address mismatch.
I can decrease the Send Timeout values to make it drop the connection earlier but this issue will still occur for at least few 10s of seconds and may cause the DNS server to do a failure cache which will expire in 10 sec.
Thanks for your response!
Is that referencing this configuration parameter?
You're welcome!
Is that referencing this configuration parameter?
Those are used only for inbound requests. The outbound requests are done separately by the DNS Client code in Technitium Library project.
Makes sense! Maybe it would be a good idea to have these exposed in the DNS Server as configuration parameters for the DNS Client, because I understand that it doesn't make sense to change it for everyone as I'm sure not everyone has the same use case
Makes sense! Maybe it would be a good idea to have these exposed in the DNS Server as configuration parameters for the DNS Client, because I understand that it doesn't make sense to change it for everyone as I'm sure not everyone has the same use case
Yes, will evaluate if changing defaults works for all scenarios or if the options needs to be configurable.
Technitium DNS Server v13.1 is now available that fixes this issue by enabling TCP keep-alive option. This will now cause DNS server to detect connection issues within around 16 seconds. Do update and let me know your feedback.
Summary: I have 2 internet connections (1 primary and 1 backup for failover). I am running Technitium as a Proxmox LXC on Ubuntu with the install script.
I am using Cloudflare and Google DoT (I also tried with DoH) as forwarders.
When my primary internet connection goes down and it fails over, DNS resolution to forwarders stops working until I restart the Technitium container.
There is internet connection available after a few seconds, I can ping from inside the container running Technitium etc... and I can manually nslookup to the Google and Cloudflare and I get a resolution. I can also use the built-in Technitium DNS client and if I choose a public resolved I get a response but if I choose This Server it doesn't resolve.
I suspect that Technitium might still be holding the old HTTP/TCP connection in the connection pool and takes a long time to realize it's been terminated ungracefully and doesn't try to establish a new one.
When using DNS-over-UDP, the problem does not occur. I assume it's because UDP is a connectionless protocol and there is no connection pooler involved.