rss.png profile for ebal on Stack Exchange, a network of free, community-driven Q&A sites
Removing Ads with your PowerDNS Resolver

In my previous post , I documented my notes on setting up a new PowerDNS Recursor for our own clients.

In this post, I will present a simple way to reduce unnecessary traffic by blocking every FQDN you dont want.



Download a well known custom HOSTS file:

# curl -s -L -o /etc/pdns-recursor/hosts.blocked

Add your FQDNs you want to block,

# echo "" >> /etc/pdns-recursor/hosts.blocked

be very careful not to block something you need.
Reminder: No support for wildcards, only FQDNs


Edit your /etc/pdns-recursor/recursor.conf to support the new hosts file:


restart your pdns and test it

# dig @localhost

;; ANSWER SECTION:   86400   IN  A

Once you have done that, you can edit your hosts.blocked when ever you want!
But dont forget to reload:

# rec_control reload-zones

Tag(s): PowerDNS