Skip to content

Instantly share code, notes, and snippets.

View samrocketman's full-sized avatar

Sam Gleske samrocketman

View GitHub Profile
@samrocketman
samrocketman / update_dns_adblock_filters
Created October 4, 2013 04:00
Generate a poisoned configuration file which bind can eat for blocking domain names. The file the script eats contains one domain per line.
#!/bin/bash
#Created by Sam Gleske
#Thu Jun 7 20:43:09 EDT 2012
adblockfile="dns_ad_block_list.txt"
adblocklistdir="/media/backup/Operating Systems - Linux/Fedora/16/configs"
adblocklist="${adblocklistdir}/${adblockfile}"
backup_dir="/media/backup/Operating Systems - Linux/Fedora/16/configs/etc/named"
outfile="/etc/named/named.conf.ads.block"
echo "Creating a unique domain list."