dnsfilter — filter a stream, looking up the domain names of any IP addresses
dnsfilter is a filter that reads its standard input, writing it to its standard output. Any lines in its input that begin with an IP address are modified to include the domain name that that IP address maps to in the Domain Name System, if available; other lines are passed through as-is.
If an IP address does not have a domain name listed in the DNS, dnsfilter leaves the line alone. If an IP address has a domain name listed in the DNS, dnsfilter inserts an equals sign and the domain name before the first space or tab in the line. If a DNS lookup fails temporarily, dnsfilter inserts a colon and a dash-separated error message before the first space or tab in the line.
While dnsfilter is looking up an address in the DNS, it reads ahead in the input and looks for more addresses to look up in parallel.
Do at most
n DNS queries in parallel. Default: 10.
Read ahead at most
n lines. Default: 1000.