Tuesday, May 1, 2012

Ubuntu Linux Save / Restore Iptables Rules

I want to make changes to an iptables configuration. How to do I Save and Restore an iptables Configuration in Ubuntu Linux server?

If you want to make changes to an iptables configuration, it is always good idea to save the current configuration by typing the following commands:
$ sudo -s
$ iptables-save > /root/working.iptables.rules

Now, you can make any changes using command line.
To restore it use the command iptables-restore, enter:
# iptables-restore < /root/working.iptables.rules

No comments:

Post a Comment