C:\Users\administrator>dnscmd /config /enableednsprobes 0
Registry property enableednsprobes successfully reset.
Command completed successfully.
C:\Users\administrator>net stop dns && net start dns
The DNS Server service is stopping.
The DNS Server service was stopped successfully.
The DNS Server service is starting.
The DNS Server service was started successfully.
C:\Users\administrator>
DIG requested kevinlocke.name and received FORMERR. After some trial and error, I determined that the issue results from DIG 9.11 sending the DNS COOKIE option. This option was enabled by default in BIND 9.11. Unfortunately, adding this option causes DNS Server to treat the request as malformed. This behavior appears to violate βAny OPTION-CODE values not understood by a responder or requestor MUST be ignored.β from Section 6.1.2 of RFC 6891, but that is of small consolation for a non-working system.
As a workaround, pass the +nocookie option (or +noedns to disable all EDNS options) as in dig +nocookie kevinlocke.name.
After testing, it's only the cookie that is causing the requests to fail
I do understand that implementing a workaround is time and effort for a flawed DNS implementation that, while in very large circulation, is not likely to appear all that often upstream of pihole setups. If that is the case then I would ask that it be noted in the prerequisites or faq and maybe some sort of info when the script ends abruptly.
I do have a question regarding whether updates will be affected by this logic as well, as pihole -up isn't a script I can modify easily.
dig_result=$(dig +short -t txt ${remote_os_domain} | tr -d '"')
if [ "${#dig_result}" == 0 ]; then
printf "Upstream DNS Error: Possible upstream Microsoft DNS or firewall blocking error\\n"
printf " Check the result of: dig -t txt %s\\n\\n" "${remote_os_domain}"
exit 1
fi
IFS=" " read -r -a supportedOS <<< "${dig_result}"
It checks that the result of the dig +short isn't 0 characters in length and errors out if it is.
Oh, definitely understood. I'm working to replace the MS DNS infrastructure. Especially since 2008R2 is no longer supported. Unfortunately I don't currently have anything newer to test it through.
I don't like abrupt failures that drop you back at the prompt without warning or explanation so I understand the idea concern. There are a few other places that silent failures happen.
This particular set of circumstances are so unique and edge case that you may be the only one ever seeing it, Raspbian 10 uses the same dig package and version so it's not specific to dig v 9.11.
Can do. While I've hacked scripts in the past, I haven't done much with git other than open issues. One of these days I should learn how to contribute other than code snippets in comments.