Modify ip-tables directly in ubuntu

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 < /root/working.iptables.rules.to.modify

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.