$ iptables-save > iptables.current; vi iptables.current; iptables-restore iptables.current; service iptables save
These series of commands allows you all at once to make a backup of your current config, edit that config, then saves it as the running config and makes it persistent. I would advise knowing what your doing to the config before running this because if you mess up say the port 22 portion, you may get knocked off the system. ;) Don't say I didn't warn ya!
by David Winterbottom (codeinthehole.com)