dnsq — query a content DNS server using the DNS protocol


dnsq {t} {fqdn} {s}


dnsq looks up resource records of type t for fqdn by making a Domain Name System request to a server at s. It prints the results in a human-readable format, more compact than the dig(1) output format.

s is expected to be the IP address or domain name of a content DNS server, and the request is marked as non-recursive. t may be a name or a number. Currently recognized names are: any, a, ns, mx, ptr, txt, cname, soa, hinfo, rp, sig, key, aaaa, axfr, and srv.

Note that if you want to perform a zone transfer you should use axfr-get(1), not dnsq [axfr].

See also


a similar tool that makes requests to proxy DNS servers


a tool that makes direct queries against a content DNS server's database


dnsq was originally part of Daniel J. Bernstein's djbdns toolset in 1999.


Original code and documentation by Daniel J. Bernstein. Documentation modernizations by Jonathan de Boyne Pollard.