#! /usr/bin/ksh ########################################################################## # Title : "LIKS" Linux Information Kludge Scripts # Author : Bryan Caddy # Category : System Tools # Date : 2007-04-20 # Web Site : http://www.titaniumservers.com/linux ########################################################################## # Crontab Entry # 0 23 * * * /opt/apfcron.ksh> /dev/null 2>&1 ########################################################################## export APFLOCATION=/etc/apf/deny_hosts.rules export DOWNLOADTEMP=/tmp/newlist.txt export APFADDFILE=/tmp/apfimport.ksh ######################################################################### #DO NOT CHANGE ANYTHING BELOW THIS LINE UNLESS YOU WANT IT TO BREAK ######################################################################### wget http://www.titaniumservers.com/denythemall.txt -o $DOWNLOADTEMP echo "#! /usr/bin/ksh" > $APFADDFILE #Any bad addresses will be ignored by apf. Repeats will also be ignored. cat $DOWNLOADTEMP |awk '{print $1}' | cut -d ']' -f1,12 |awk '{print "apf -d "$1}' >> $APFADDFILE chmod 700 $APFADDFILE >/dev/null 2>&1 $APFADDFILE >/dev/null 2>&1 rm -rf $APFADDFILE rm -rf $DOWNLOADTEMP #If you have a better way todo this, please email me.. I am alsways looking. exit 0