2

I downloaded BIND from https://www.isc.org/download/ and installed it following https://nil.uniza.sk/how-install-dig-dns-tool-windows-7. When I run dig it does not show any answer section. For example:

[C:\]dig www.google.com

; <<>> DiG 9.14.2 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 57789
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 2ac0657d3869a2f4 (echoed)
;; QUESTION SECTION:
;www.google.com.                        IN      A

;; Query time: 15 msec
;; SERVER: 172.24.32.222#53(172.24.32.222)
;; WHEN: Tue Jun 04 09:53:18 FLE Daylight Time 2019
;; MSG SIZE  rcvd: 55
tok
  • 153
  • 5

1 Answers1

3

This seems to rather be some incompatibility with the server you are querying (172.24.32.222), as it responds with status FORMERR (it claims the query is malformed).

Is it possible that 172.24.32.222 is running some outdated, possibly noncompliant, DNS software? Without any additional info, I find this more likely than that the problem would be with the current dig.
(If the server is indeed outdated and/or noncompliant, then you have the route to the proper solution right there.)

To troubleshoot, and possibly finding a workaround, I would suggest simplifying the query to figure out what specifically makes this server fail.

I would suggest that you try with +nocookie, if that doesn't change anything, maybe try +noedns.

Håkan Lindqvist
  • 35,011
  • 5
  • 69
  • 94
  • Thank you! Both +nocookie and +noedns worked! Dig doesn't give "WARNING: recursion requested but not available" if I add +nocookie or +noedns. – tok Jun 04 '19 at 09:48
  • @tok Out of the two, `+nocookie` is the lesser evil to have as a workaround (it disables a specific EDNS feature rather than all of EDNS). – Håkan Lindqvist Jun 04 '19 at 09:51
  • Does Dig for Windows have a config file I could put +nocookie permanently? – tok Jun 04 '19 at 10:03
  • 1
    @tok Normally that would just be a matter of putting your default options in `~/.digrc` (ie `.digrc` in your home dir). A quick experiment suggests that it relies on `HOME` having been set to your home dir (generally true in unix-like environments). As for the Windows build, it would probably be better if it knew to use `USERPROFILE` (?) instead. Anyway, if you help it along a little by setting `HOME`, it all seems to work normally on Windows as well. – Håkan Lindqvist Jun 04 '19 at 10:18