You want them to load as like single commands when the box boots up? Well that's not too bad. Here is a quick way of doing it.
first edit your /etc/rc.d/rc.local file and put a line in there like "/root/iptables_script" or something (whatever you want to call the file that'll hold the commands and the path to that file).
Then go to that path (like in my example it's /root/iptables_script) and create a new file "vi iptables_script" or any other editor of your choice.
You'll first need to flush the rules out (sorry I'm at school and I don't fully remember the full syntax but this should get ya started) like:
Code:
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
From here you can then put your own rules and such. After you are done save the file and exit the editor.
use "chmod" to change the permissions to "700" (for read, write, exec)
Code:
chmod 700 /root/iptables_script
Okay now just reload the rc.local file by doing
Code:
/root/iptables_script
There ya go....you should now be able to do "iptables --list" and see all the rules you applied. If you don't want this to run at start up you can just simply take the "/root/iptables_script" line out of the rc.local. Doing this would mean you'd have to invoke your own exec of the file to change the rules. (You may want to write many different files and depending on what type of internet traffic you'll be using you can run that script and then have it after so long rerun the other script).
Goodluck