Modify ip-tables directly in ubuntu

December 5, 2011

To modify ip-tables directly in ubuntu

First save off your current config:

$ sudo -s
$ iptables-save > /root/working.iptables.rules

$ iptables-save > /root/working.iptables.rules.to.modify

At this point you can modify the file.  Once your are satisfied restore it

# iptables-restore