GithubHelp home page GithubHelp logo

bind-adblock's Introduction

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.

Uses the following sources:

Setup

Python packages

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

Configure BIND

Add the response-policy statement to the BIND options

// For AdBlock
response-policy {
	zone "rpz.example.com";
};

Add your rpz zone. Replace example.com with a domain of your choice.

// AdBlock
zone "rpz.example.com" {
	type master;
	file "/etc/bind/db.rpz.example.com";
	allow-query { none; };
};

Create a zone file for your zone. Replace example.com with the domain you used before.

@ 3600 IN SOA @ admin.example.com. 0 86400 7200 2592000 86400
@ 3600 IN NS ns.example.com.

Usage

usage: update-zonefile.py [-h] [--no-bind] zonefile origin

Update zone file from public DNS ad blocking lists

positional arguments:
  zonefile    path to zone file
  origin      zone origin

optional arguments:
  -h, --help  show this help message and exit
  --no-bind   Don't try to check/reload bind zone

Example: update-zonefile.py /etc/bind/db.rpz.example.com rpz.example.com

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

Whitelist

An additional zone can be used to whitelist domains. See Whitelist

bind-adblock's People

Contributors

afrimberger avatar logi85 avatar trellmor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.