Skip to content
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

resolve-dns throw a powershell error with non existent domain #3

Open
wyldspyder opened this issue Jun 9, 2023 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@wyldspyder
Copy link

As the tile said, the module throw a powershell error and not a "inexistent domain" with an inexistent domain.

Ex:

⮞  resolve-dns xttox.com`
MethodInvocationException: C:\Users\exp1x835\OneDrive - Beneva\Documents\PowerShell\Modules\DnsClient-PS\1.1.1\Public\Resolve-Dns.ps1:78`

Line |
  78 |                  $client.QueryServer($nsList, $qst)
     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "QueryServer" with "2" argument(s): "Query 42931 => xttox.com IN A on
     | 96.45.46.46:53 timed out or is a transient error."
@rmbolger rmbolger self-assigned this Jun 9, 2023
@rmbolger rmbolger added the bug Something isn't working label Jun 9, 2023
@rmbolger
Copy link
Owner

rmbolger commented Jun 9, 2023

Hey @wyldspyder, thanks for reaching out. I can't seem to reproduce this on my machine. I get a normal NXDOMAIN response when looking up that record, not an exception even if I query the same 96.45.46.46 nameserver your client seems to be.

> resolve-dns xttox.com -NameServer 96.45.46.46

NameServer   : 96.45.46.46:53
Additionals  : {}
AllRecords   : {a.gtld-servers.net.}
AuditTrail   :
Answers      : {}
Authorities  : {a.gtld-servers.net.}
ErrorMessage : Non-Existent Domain
HasError     : True
Header       : ;; ->>HEADER<<- opcode: Query, status: Non-Existent Domain, id: 4778
               ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
Questions    : {xttox.com. IN A}
MessageSize  : 100
Settings     : DnsClient.LookupClientSettings

I get essentially the same result from dig.

>dig xttox.com @96.45.46.46

; <<>> DiG 9.17.15 <<>> xttox.com @96.45.46.46
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 42626
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;xttox.com.                     IN      A

;; AUTHORITY SECTION:
com.                    900     IN      SOA     a.gtld-servers.net. nstld.verisign-grs.com. 1686337593 1800 900 604800 86400

;; Query time: 39 msec
;; SERVER: 96.45.46.46#53(96.45.46.46) (UDP)
;; WHEN: Fri Jun 09 12:06:49 Pacific Daylight Time 2023
;; MSG SIZE  rcvd: 100

@wyldspyder
Copy link
Author

Hi @rmbolger ! thanks for the fast answer !!

I think I might have an idea but i'm not an expert ont this. As your test, i've tested it on my personal computer and work exactly the same as you. The problem arose when I use it with my work computer, and I know that we can only issue DNS request to specific server only, as any DNS request will be blocked by the firewall, can it be ??

@rmbolger
Copy link
Owner

rmbolger commented Jun 9, 2023

That could definitely be it. The error message you got was specifically a "connection timed out" error which means either your machine was being blocked from reaching the designated nameserver or the nameserver itself was offline or not responding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants