
iptables-save > {filename} and tada! You now have a safe restore point should your editing go awry.iptables-restore < {filename} If things go belly up don't lose your cool. Just hit the remote console (I did tell you to make sure you have console access right?) and use iptables-restore to reload the saved copy of your known good rule set. You DID save a copy of the previous rule set like you were supposed to right?iptables -Fto flush all the active rules leaving you without access to your machine and forced to use the console in shame.
-A INPUT -j LOG --log-level 6so that you can see when your rules are denying traffic by checking /var/log/messages or wherever your OS flavor prefers to dump iptables info.