Linux Firewall Builder
Linux Firewall Builder - XML to iptables Converter
A Perl program that takes firewall rules written in XML and generates an iptables based shell script for Linux based firewall boxes.
I've only run it on RedHat based distributions so the generated shell script may need some tweaking on other distributions.
I've modulised the package so in theory the iptables module could be replaced with an ipfilter or ipfw module if necessary. Although I've not had (nor am I likely to get) the time to test this.
Documentation
Examples
There is a sample XML file and the resulting script it generated.