Journal jlanthripp's Journal: A simple script (adapted from vandan's spam blacklist)
Here's something I picked up in my /. travels, posted by vandan today. I modified it a little, but it still does basically the same thing. The blacklist is a text file in which each line is an IP address. I keep it in /etc/blacklist. Very simple, very small, and in the words of the original author, it works :)
(BEGIN SCRIPT)
#!/bin/bash
# variables
BLACKLIST=/etc/blacklist
IPTABLES=/sbin/iptables
# Do stuff.
for IP in `cat $BLACKLIST`
do
echo Blacklisting Host: $IP
$IPTABLES -A INPUT -s $IP -j DROP
done
exit 0
(END SCRIPT)
A simple script (adapted from vandan's spam blacklist) More Login
A simple script (adapted from vandan's spam blacklist)
Slashdot Top Deals