Hi,
I would like to make a backup of my iptables rules.
Where is the iptables save-file?
Thanks,
backup iptables
-
Chris
- Site Admin
- Posts: 132
- Joined: Mon Jul 21, 2008 9:45 am
- Location: Leuven, Belgium
Re: backup iptables
The easiest way to make a backup is
The rules are now in iptables.bak
You can restore them with
The standard save-file depends on your system.
check /etc/conf.d/iptables for where they are saved.
on my PC (gentoo) it is /var/lib/iptables/rules-save.
I believe on CentOS it is /etc/sysconfig/iptables.save.
Hope this helps.
Code: Select all
iptables-save > iptables.bakYou can restore them with
Code: Select all
iptables-restore < iptables.bakcheck /etc/conf.d/iptables for where they are saved.
on my PC (gentoo) it is /var/lib/iptables/rules-save.
I believe on CentOS it is /etc/sysconfig/iptables.save.
Hope this helps.