项目作者: expeditioneer

项目描述 :
BIND DNS RPZ ad-blocker
高级语言: Python
项目地址: git://github.com/expeditioneer/bind-adblock.git
创建时间: 2018-10-04T19:02:07Z
项目社区:https://github.com/expeditioneer/bind-adblock

开源协议:GNU General Public License v3.0

下载


DEPRECATED

No longer maintained. I personally don’t use this any longer.

BIND ad blocker

Fetch various blocklists and generate a BIND zone from them.

Configure BIND to return NXDOMAIN for ad and tracking domains to stop clients from contacting them.

Requires BIND 9.8 or newer for RPZ support.

The sources can be configured with the blocklists.conf file

Setup

Copy the update-zonefile.py script to /usr/local/bin.
Copy the update-blacklist-zonefile.service and update-blacklist-zonefile.timer into /etc/systemd/system.

Afterwards execute
```shell script
systemctl enable update-blacklist-zonefile.service
systemctl enable update-blacklist-zonefile.timer

  1. and
  2. ```shell script
  3. systemctl start update-blacklist-zonefile.service

Required Python packages

These packages need to be installed to run the update script.

Usage

Useage of the ‘update-zonefile.py’ script

  1. usage: update-zonefile.py [-h] [-v | -q] [--print-bind-config] [--reload-zone]
  2. zonefile origin
  3. positional arguments:
  4. zonefile name of the generated file
  5. origin name of the zone
  6. optional arguments:
  7. -h, --help show this help message and exit
  8. -v, --verbose increase verbosity (specify multiple times for more output)
  9. -q, --quiet suppress output, except fatal messages
  10. --print-bind-config print necessary configuration of BIND to use the generated file
  11. --reload-zone trigger a reload of the zone after update

Example: update-zonefile.py /var/bind/rpz/blacklist.zone rpz.blacklist -q --reload-zone

update-zonefile.py will update the zone file with the fetched server lists and issue a rndc reload origin afterwards.