From e7ffd040ebd73f8d99860b6929f4369a0a65a87e Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Thu, 28 May 2015 15:20:10 -0500 Subject: [PATCH] Save iptables after flushing during cloud-init The iptables rules should be saved after being flushed as part of the cloud-init process. If the reboot plugin is used, the default CentOS rules are loaded on boot because we are not saving the cleared set of rules. This can cause some network configurations to break. Ubuntu is not impacted as they do not have any 'default' rules. Change-Id: I49842cd833a736f318dd237f07be2267dbfb27ab Closes-Bug: 1459733 --- cloud-init-templates/cloud_config_centos.jinja2 | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud-init-templates/cloud_config_centos.jinja2 b/cloud-init-templates/cloud_config_centos.jinja2 index efbf37a..717a9ce 100644 --- a/cloud-init-templates/cloud_config_centos.jinja2 +++ b/cloud-init-templates/cloud_config_centos.jinja2 @@ -44,6 +44,7 @@ runcmd: {% endif %} - iptables -t filter -F INPUT - iptables -t filter -F FORWARD + - service iptables save # that module's missing in 0.6.3, but existent for >= 0.7.3 write_files: