#!/bin/bash set -eu OK=/var/run/cinder/fedora-iptables.ok if [ -e $OK ] ; then exit 0 fi DISTRO=`lsb_release -si` || true if [[ "Fedora" = $DISTRO ]]; then # Check if the iptables service is active if systemctl is-active iptables.service ; then IPT_FILE=/etc/sysconfig/iptables if [ -f $IPT_FILE ]; then iptables-restore < $IPT_FILE fi # Openstack services iptables -I INPUT -p tcp -m multiport --dports 3260, 8776 -j ACCEPT iptables-save > $IPT_FILE fi fi touch $OK