Search

Language:  
Search for:

Available article translations:

Rules disappear after restarting iptables

APPLIES TO:
  • Parallels Plesk Panel for Linux/Unix
  • Parallels Plesk Sitebuilder for Linux/Unix
  • Parallels Plesk Expand
  • Parallels Operations Automation
  • Parallels Business Automation - Enterprise
  • Parallels Business Automation - Standard
  • Parallels Virtuozzo Containers for Linux
  • Parallels Server

Symptoms

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?

Cause

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.

Resolution

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

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


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.
This method is preferable if you want to leave the server intact.



56797cefb1efc9130f7c48a7d1db0f0c 49af2da0f2dd4c81e962790bbbd0c2b4 5d735c0e028ee5b991e4fb80d34fb87f 790d5a2891858d1226e682d00e6106a9 bfe5815000fa4d6406f980c3dc0b4088 3ab1af55c4b84a70b6e8e87334f3a6ea ca05eaf5b843fbd53589c90d7228a6df 2897d76d56d2010f4e3a28f864d69223 4f06e569887915c59ae1fa4680142e7f caea8340e2d186a540518d08602aa065 d475fdc3db14382c01697df7c71c3b94 64cafed7cc15bceb3b240d8c2f92dce3 eb0ea3b827d18de2329b6477e24c1d59 909d99074e442b52ce54cc7b31cf065d

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Desktop Virtualization
- Parallels Desktop 9 for Mac
- Parallels Transporter
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac Enterprise Edition
- Parallels Management-Mac for Microsoft SCCM
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0 Beta
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification