quicktables is an iptables ruleset generator. It asks a few questions about how you'd like to configure your firewall, and writes to rc.firewall in the current directory.
rc.firewall