Skip to content

Latest commit

 

History

History
69 lines (63 loc) · 5.04 KB

File metadata and controls

69 lines (63 loc) · 5.04 KB

Grabbing Blacklisted Domains for Bind9-RPZ

Bash script-pack to update blacklisted domains in BIND9 Response Policy Zone
Please consider adapting this pack to fit your environment properties,
since simple duplication may not given appropriate results.
The partial output of this script-pack can be found at this repo



featuring

  • free from duplicate entries and sub-domains entries (if it's parent-domain exist) across entire categories
  • free from invalid TLDs and domain entries that construct with international characters (non ASCII)
  • ip-address is written in CIDR block
  • updated RPZ dataBase and incremented serial-zones are syncronized to BIND9-server and propagate the new update

script-pack

  1. grab_http.sh --grabbing and proccessing domains from sources-list
  2. grab_duplic.sh --removing duplicate entries and sub-domains if parent domain exist
  3. grab_build.sh --rewriting to Bind9-RPZ format-entry
  4. grab_cereal.sh --incrementing serial number at rpz.*
  5. grab_library --a library of functions. intended for use by other scripts, not to be executed directly
  6. grab_urls --urls of sources-list. case sensitive, sort as is, line count and no blank lines
  7. grab_regex --list of reguler expressions. case sensitive, sort as is, line count and no blank lines
  8. grab_rsync.sh --intended for syncronize latest dBASE to Bind9 host
  9. grab_config --configurations file
  10. rpz.* --pack of zone-files

NOTE
Place them all under the same directory

requirements:

usage:

  • execute grab_http.sh with non root privileges either directly as a root user or by use of sudo command, from your linux desktop workstation then follow the next step

output:

  • new files with prefix db.* are dataBases for RPZ and ready to use at BIND9-server
  • incremented serial of zone-files - rpz.*, ready to use too
  • new files with prefix txt.* as the output of grab_duplic.sh can be found at this repository

others: