Ubuntu 12.04 has the default firewall ufw enabled, but I rather use iptables. And everytime I reboot the system, I run a script to enable the firewall rules again. But I just found out I don’t need to, there’s a tool for that. Of course.
sudo apt-get install iptables-persistent
That asks you to save the current IPv4 and IPv6 rules and creates a service that is started at boot time so it reads the created files.