dns2tcp icon indicating copy to clipboard operation
dns2tcp copied to clipboard

Satisfy some public resolvers by replying with SERVFAIL to unparsed requests

Open v0s opened this issue 1 year ago • 0 comments

TL;DR—fixes some recursive resolvers not working with dns2tcp.

A couple of popular public resolvers (e.g. Cloudflare 1.1.1.1, Yandex 77.88.8.8) don't actually adhere to forwarding client's DNS requests.

For example, on requesting TXT AAAAAIoRAA.=auth.your-dns2tcp-domain.com. they sometimes go and try to resolve A =auth.your-dns2tcp-domain.com. dns2tcpd currently just ignores those requests, which makes the recursive resolver to just timeout and return with SERVFAIL.

This patch makes dns2tcpd respond with SERVFAIL to unparsed requests. In this case, recursive resolver receives the reply, and re-requests the actual TXT that the client was asking it in the first place.

v0s avatar Apr 18 '23 16:04 v0s