Net::DNS::Dynamic::Adfilter is a DNS server intended for use as an ad filter for a local area network. Its function is to load lists of ad domains and nullify DNS queries for those domains to the loopback address. Any other DNS queries are proxied upstream, either to a specified list of nameservers or to those listed in /etc/resolv.conf. The module can also load and resolve host definitions found in /etc/hosts as well as hosts defined in a sql database.
The module loads externally maintained lists of ad hosts intended for use by Adblock Plus, a popular ad filtering extension for the Firefox browser. Use of the lists focuses only on third-party listings that define dedicated advertising and tracking hosts.
A locally maintained blacklist/whitelist can also be loaded. In this case, host listings must conform to a one host per line format.
Once running, local network dns queries can be addressed to the host's ip. This ip is echoed to stdout.
my $adfilter = Net::DNS::Dynamic::Adfilter->new();
Without any arguments, the module will function simply as a proxy, forwarding all requests upstream to nameservers defined in /etc/resolv.conf.