Archive for March, 2009

IPF blacklist

I made a little program called ipf-blacklist that grabs the blacklists from Wizcrafts and parses the IP nets into my ipf.rules file and then reloads the firewall. The blacklists from Wizcraft contains well known ip nets with spammers, scammers and hackers. Since the lists gets updated every now and then I can now just add this program to crontab and know that I have the recent lists active and up to date.
Read more

FreeBSD jail upgrade script

I wrote a little script today to assist me when upgrading my jails on my FreeBSD box. Remember that you need to have done the usual build world and build kernel before running this to get the new changes into your jails. I never have my jails running while updating them, so blame yourself if you screw something up. It’s nothing fancy though, but I use it without trouble.

#!/usr/local/bin/bash
JAILS=/home/jails
cd /usr/src
for jail in `ls ${JAILS}`; do
mergemaster -pD ${JAILS}/${jail}
make installworld DESTDIR=${JAILS}/${jail}
mergemaster -iD ${JAILS}/${jail}
done