Python script for generate blacklist or rpz file: pi-hole, bind, dnsmasq, mikrotik, powerdns and system hosts.
- System Hosts file
- Mikrotik DNS static
- pi-hole
- bind9
- Dnsmasq
- PowerDNS
- Technitium DNS Server using System Hosts file
- Knot Resolver using bind rpz format
- CoreDNS using System Hosts file
-
minimum python version : 3.6.9
-
install required modules
- run
pip3 install -r requirements.txt
- run
-
setup
config/app.yaml- copy
config/app.yaml.exampletoconfig/app.yaml app.yamlparameters :resolve_ip: resolve ip of blacklisted domain (bind, dnsmasq, mikrotik, powerdns and system hosts).wildcard: add wildcard on blacklisted domain (only for bind, dnsmasq and powerdns).blacklist: set of blacklist url (format source : system hosts file or list domain).whitelist: set of whitelist url (format source : system hosts file or list domain).axfr_zones_blacklist: set of blacklist with axfr (zone transfer dns), this may take some time on huge zone.axfr_zones_whitelist: set of whitelist with axfr (zone transfer dns), this may take some time on huge zone.
- copy
-
generate blacklist
- run
python3 run.py - check generated files on
buildfolder for each format
- run
-
clean generated tmp and build file
- run
python3 clean.py
- run