#!/bin/sh # Just a quick script to run once a day in crontab on my mail servers... # Ref: http://www.spamhaus.org/drop/ /sbin/iptables-restore < /var/lib/iptables/active && for i in $(wget -q -O - 'http://www.spamhaus.org/drop/drop.lasso' | grep -v '^;.*'| awk '{print $1}'| sed -r -e 's/;.*//g'); do /sbin/iptables -I INPUT -s $i -j DROP; iptables -I OUTPUT -s $i -j DROP; done