$ which host /usr/bin/host $ $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal $ $ dnsmasq --version Dnsmasq version 2.80 Copyright (c) 2000-2018 Simon Kelley Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile This software comes with ABSOLUTELY NO WARRANTY. Dnsmasq is free software, and you are welcome to redistribute it under the terms of the GNU General Public License, version 2 or 3. $ $ echo 'localhost == dnsmasq DNS' localhost == dnsmasq DNS $ $ host -v myhost.mydomain.tld localhost Trying "myhost.mydomain.tld" Using domain server: Name: localhost Address: 127.0.0.1#53 Aliases: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54465 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;myhost.mydomain.tld. IN A ;; ANSWER SECTION: myhost.mydomain.tld. 0 IN A xxx.xxx.xxx.xxx Received 49 bytes from 127.0.0.1#53 in 0 ms Trying "myhost.mydomain.tld" Host myhost.mydomain.tld not found: 5(REFUSED) Received 33 bytes from 127.0.0.1#53 in 0 ms Trying "myhost.mydomain.tld" Host myhost.mydomain.tld not found: 5(REFUSED) Received 33 bytes from 127.0.0.1#53 in 0 ms $ $ $ $ $ host -v myhost.mydomain.tld 1.1.1.1 Trying "myhost.mydomain.tld" Using domain server: Name: 1.1.1.1 Address: 1.1.1.1#53 Aliases: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5129 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;myhost.mydomain.tld. IN A ;; ANSWER SECTION: myhost.mydomain.tld. 376 IN A xxx.xxx.xxx.xxx Received 64 bytes from 1.1.1.1#53 in 4 ms Trying "myhost.mydomain.tld" ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55438 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;myhost.mydomain.tld. IN AAAA ;; AUTHORITY SECTION: lunk.in. 376 IN SOA ns67.domaincontrol.com. dns.jomax.net. 2020070102 28800 7200 604800 600 Received 111 bytes from 1.1.1.1#53 in 0 ms Trying "myhost.mydomain.tld" ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23061 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;myhost.mydomain.tld. IN MX ;; AUTHORITY SECTION: lunk.in. 376 IN SOA ns67.domaincontrol.com. dns.jomax.net. 2020070102 28800 7200 604800 600 Received 111 bytes from 1.1.1.1#53 in 4 ms $ $ filter_out_comments_and_blank_lines /etc/dnsmasq.conf domain-needed bogus-priv no-resolv no-poll interface=xxx no-dhcp-interface=xxx bind-interfaces no-hosts addn-hosts=/etc/dnsmasq_records domain=myhost.mydomain.tld $ $ $ alias filter_out_comments_and_blank_lines alias filter_out_comments_and_blank_lines='awk '\''!/^ *#/ && NF'\''' $