dnsnamex — look up the domain name(s) of an IP address
dnsnamex
{addr
...}
dnsnamex looks up PTR resource records, for the reverse-lookup domain name corresponding with addr
, in the Domain Name System and prints (all of) the domain name(s) of addr
on a single line.
If addr
has no domain names, dnsnamex prints a blank line.
You can list several addr
s; dnsnamex prints each result on a separate line.
Note that the DNS protocol itself makes no guarantee of any particular ordering within a PTR resource record set. If there are multiple PTR resource records, ordering is determined by the actions of the content DNS server, what proxy DNS servers are in the path, and the local DNS client library; and is unspecified.
Normally dnsnamex exits 0. If it encounters a temporary problem that prevents it from determining the list of IP addresses, it prints an error message and exits 111.
dnsnamex makes all DNS lookups using the locally configured DNS proxy server. See dnsqr(1) for how this server is found.
a similar tool that prints only one domain name
a filter that looks up the domain name(es) for multiple IP addresses in parallel