Saving Changes for iptables

Posted by suvi under Security

Whenever you make a change to your firewall, on a Fedora/CentOS type system, you will want to save the changes.
The output can be redirected to a file.
# iptables-save > /root/firewall-rules
The following command line restores all rules from /root/firewall-rules assuming that the file /root/firewall-rules exists.
# iptables-restore < /root/firewall-rules
By default, iptables-restore deletes all existing rules before restoring

Read more at Begin Linux Blog

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word