Saving and Restoring iptables

It’s good practice to backup iptables before making any changes.

1
iptables-save > ~/iptables.original.txt

And if you need to restore, you can use either….

1
cat ~/iptables.original.txt | iptables-restore

…or…

1
iptables-restore < ~/iptables.original.txt

Be the first to comment

Leave a Reply