#!/bin/sh ## Made by immelmann @ rizon.net for the dronebl.org project. ## Update the paths then cron this to check every 5 minutes. # */5 * * * * /path/to/dnsblupd ## To set up rbldnsd off BSD Ports # cd /usr/ports/dns/rbldnsd && make install clean # Add to /etc/rc.conf # rbldnsd_enable="YES" # rbldnsd_flags="-q -f -r/var/lib/rbldns -b YOUR.LISTEN.IP.ADDR dnsbl.dronebl.org:ip4set:dronebl.zone" # Then mkdir /root/script and /root/script/tmp # ## To set up rbldnsd in Debian / Ubuntu # sudo apt-get install rbldnsd # sudo groupadd rbldns # sudo useradd -g rbldns -d /var/lib/rbldns -s /bin/false rbldns # Add the following to /etc/default/rbldnsd # RBLDNSD="dnsbl -f -u rbldns -r /var/lib/rbldns -b YOUR.LISTEN.IP.ADDR/PORT \ # dnsbl.dronebl.org:ip4set:dronebl.zone" # Then mkdir -p /root/script/tmp WGETURL="http://dronebl.org/buildzone.do" WGETPATH="/root/scripts/tmp/dronebl.zone" DNSBLPATH="/var/lib/rbldns/dronebl.zone" TESTIP="127.0.0.2" /usr/bin/wget -q ${WGETURL} --output-document=${WGETPATH} >/dev/null if [ "`grep "${TESTIP}" ${WGETPATH}`" ] then STATUS="1" else echo "Error- New zonefile possibly corrupt. Not overwriting old." rm -f ${WGETPATH} exit 0 fi /bin/mv -f $WGETPATH $DNSBLPATH >/dev/null