alexreinert / ARSoft.Tools.Net

This project contains a complete managed .Net SPF validation, SenderID validation and a dns client and dns server implementation written in C#.
Apache License 2.0
168 stars 81 forks source link

DnsClient.Default.Resolve is returing null in server, even though we got the result in public dns lookup #26

Closed somratcste closed 1 year ago

somratcste commented 1 year ago

We got null return in server for some cases. But when I have tested in my local with the same domain and same functionality we got the result always. For the same domain, I have also checked here: https://dnschecker.org/ It looks fine.

DnsMessage dnsMessage = DnsClient.Default.Resolve(DomainName.Parse("google.com"), RecordType.Txt) // returns null in server some times

Using Version: "2.2.9" .Net Version: v4.7.2

alexreinert commented 1 year ago

DnsClient.Default uses your locally configured DNS server. Does this server provide the TXT records?

somratcste commented 1 year ago

Yes, it does

alexreinert commented 1 year ago

Please provide a wireshark dump where the problem occurs.

somratcste commented 1 year ago

Could you please explain a little bit what do you need to know?

alexreinert commented 1 year ago

I need a dump of the DNS network traffic, this can be done using Wireshark.

somratcste commented 1 year ago

I can't share this kind of information.

alexreinert commented 1 year ago

Then I cannot help you. I checked it, there is no general issue, so it needs to be debugged if the packages are correct on the network or if there is an issue with the DNS server or on network level.

alexreinert commented 1 year ago

You could try to not use the DnsClient.Default but an defined DNS like the Google DNS using a custom DnsClient instance.

somratcste commented 1 year ago

I appreciate your assistance and response, @alexreinert. Unfortunately, I am unable to provide additional information, which makes it difficult to identify any potential security breach on your end. However, I have found an alternative solution and am satisfied with closing the matter.