I think it is actually better *not* to store the iptables settings.
It is much better to write a script which starts with flushing all chains, and then establish new rules.
If you do, it is MUCH easier to change things. Just edit the script and run it again. If you do save and restore, it is virtually impossible to change something. Unless you have a perfect memory so you can remember exactly what the status of iptables is at any moment that you perform a change.
There are many examples of iptables scripts available on the net. Also refer to
this tutorial. It contains an excellent explanation of iptables, and a number of example scripts at the end.
Debian also comes with the ipmasq package. When you install ipmasq, it automatically generates a script which is makes your machine a masquerading firewall. This is very useful, I used it as the base for writing my own, highly tailored firewall script.
If you use a script, do not forget to start with flushing all chains, deleting all custom tables and setting the correct policy. If you forget to null out one rule, you can be looking for days why certain traffic never complets. I know from experience.
jlinkels