go to http://pointman.org
and download pmfirewall. It's a great little script that will create a very good IPchains ruleset for you. If you're using IP Masquerading at home it will automatically set this up for you as well.
I did it the hard way the first few times, then I found this script and I haven't looked back. If you want to add a custom ruleset all you have to do is add it to /usr/local/pmfirewall/pmfirewall.rules.local
It's also a great way to start because you can learn by studying the rulesets that it generates.