dnsmasq returns REFUSED instead of NXDOMAIN
Hi,
I have a script here (software installer from a big company) that makes a few DNS checks of the environment. It uses `host` for that.
I use dnsmasq to manage ALL DNS queries. There are no other upstream servers.
So, if the script runs host my.fqdn, it checks by default A, AAAA and MX.
host now return "my.fqdn has address 1.2.3.4" and two lines of "my.fqdn not found (REFUSED)" for AAAA and MX. Correct, they do not exist. But the script checks the output of `host` for "not found". And it fails.
So, maybe the script is wrong- but I checked that host command against a windows server DNS. Thete, host only return one line, the "my.fqdn has address 1.2.3.4" - nothong else. Why?
dig'ing into this, I got the reason: dnsmasq return REFUSED for those, non exitent entries, Windows return NXDOMAIN. The Host command reacts in another way then.+
WHich is right here? I believe, that NXDOMAIN amkes more sense here, why is dnsmasq returning REFUSED?
Workaround for me now: add `address=/fqdn/` to the conf. The returns the correct, known /etc/hosts IP and NXDOMAIN for all other, non known queries.
Tested on Ubuntu 16.04 with dnsmasq 2.75 and Ubuntu 20.04 with dnsmasq 2.80.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu dnsmasq Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: