Article ID: 121167, created on Apr 18, 2014, last review on May 7, 2014

  • Applies to:
  • Operations Automation
  • Plesk
  • Virtuozzo
  • Virtuozzo containers


I have stopped and started iptables with these commands:

~# /etc/init.d/iptables stop

~# /etc/init.d/iptables start

Now I see that some rules have disappeared. What could be the reason?


If rules were added using /sbin/iptables utility, they were added to a chain in the memory and were not committed to the hard disk. Upon restart, those rules were flushed from the memory and not restored.


In order to avoid losing rules during an iptables restart, you need to save them before the restart.

  1. Method 1:

    ~# iptables-save > iptables_save.txt

    If using this method, you will need to restore the rules after the restart:

    ~# iptables-restore < iptables_save.txt

  2. Method 2:

    ~# /etc/init.d/iptables save
    Saving firewall rules to /etc/sysconfig/iptables: [ OK ]

The above command saves the rules to the file system, and an iptables restart will not affect them.

Related Articles

RedHat: Saving IPTables Rules

CentOS: Saving IPTables Rules

Search Words

save rules


Rules disappear

iptables restart


a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223 5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 0dd5b9380c7d4884d77587f3eb0fa8ef 198398b282069eaf2d94a6af87dcb3ff 400e18f6ede9f8be5575a475d2d6b0a6 614fd0b754f34d5efe9627f2057b8642

Email subscription for changes to this article
Save as PDF