Unbound /
Configuring Unbound as adblocker
Unbound as an adblocker
Unbound, by using blacklists, can play the role of an adblocker. Such curated list can be found on https://oisd.nl/setup/unbound. In order to use it, you have to:
- download one of the lists, for example https://small.oisd.nl/unbound
- give it a suitable name like unbound-bl.conf
- place it in /var/unbound/etc
- add this line in unbound.conf:
include: "/var/unbound/etc/unbound"
If this produces no error, you can restart the service with rcctl. To check that the blacklist prevents the name resolver from getting an IP, the "dig" command of a blacklisted domain should return 0.0.0.0.
For example:
$ dig trc.taboola.com ... ;; ANSWER SECTION: trc.taboola.com. 3600 IN A 0.0.0.0 ...
See Also: