Saving iptables firewall rules

To save iptables firewall rules, run

iptables-save

This will print the firewal rule. You can save it to a file. For example

iptables-save > /etc/iptables/rules.v4

For IPv6, you can use

ip6tables-save
Need help with Linux Server or WordPress? We can help!

Leave a Reply

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