If you want to drop everything that's coming from the net to you, except for what you've started yourself, here's how it goes:
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
That's the start; you could save that as a shell script, modify it for your needs and run again to "apply" the changes. Oh, and remember to run iptables-save
after you're done to save the changes so they're loaded at next boot.
What the above does, is flush all existing rules, remove all user-defined chains (so make the "tables clean"), then set incoming and forwarded traffic to be dropped, outgoing to be accepted; then add a new rule to the incoming traffic that lets stuff come trough that is related to traffic that's already going on, or that you have established. A short, nice start.