You want to save your firewall configuration.
Save your settings:
For iptables :
# iptables-save > /etc/sysconfig/iptables
For ipchains:
# ipchains-save > /etc/sysconfig/ipchains
The destination filename is up to you, but some Linux distributions (notably Red Hat) refer to the files we used, inside their associated /etc/init.d scripts.
ipchains-save and iptables-save print your firewall rules in a text format, readable by ipchains-restore and iptables-restore, respectively. [Recipe 2.20]
|
iptables-save(8), ipchains-save(8), iptables(8), ipchains(8).