diff --git a/iptables/templates/iptables-rules.v4.j2 b/iptables/templates/iptables-rules.v4.j2 index b55e885..65d6e76 100644 --- a/iptables/templates/iptables-rules.v4.j2 +++ b/iptables/templates/iptables-rules.v4.j2 @@ -186,27 +186,28 @@ -A INPUT -m pkttype --pkt-type multicast -d {{ orientdb_hazelcast_multicast_group }} -j ACCEPT -A INPUT -m state --state NEW -p tcp -m tcp --dport {{ orientdb_hazelcast_multicast_port }} -j ACCEPT {% endif %} -{% if ganglia_enabled is defined %} -{% if ganglia_enabled %} -{% if ganglia_gmond_cluster_port is defined %} # Ganglia -{% if not ganglia_unicast_mode %} +{% if ganglia_enabled is defined and ganglia_enabled %} +{% if ganglia_gmond_cluster_port is defined %} +{% if ganglia_unicast_mode is defined %} +{% if ganglia_unicast_mode %} +{% for net in ganglia_unicast_networks %} +-A INPUT -p udp -m udp -s {{ net }} --dport {{ ganglia_gmond_cluster_port }} -j ACCEPT +{% endfor %} +{% else %} {% if ganglia_gmond_use_jmxtrans is not defined or not ganglia_gmond_use_jmxtrans %} -A INPUT -m pkttype --pkt-type multicast -d {{ ganglia_gmond_mcast_addr }} -j ACCEPT {% else %} -A INPUT -m pkttype --pkt-type multicast -j ACCEPT -A INPUT -p udp -m udp -d {{ ganglia_gmond_mcast_addr }} --dport {{ ganglia_gmond_cluster_port }} -j ACCEPT {% endif %} -{% else %} -{% for net in ganglia_unicast_networks %} --A INPUT -p udp -m udp -s {{ net }} --dport {{ ganglia_gmond_cluster_port }} -j ACCEPT -{% endfor %} +{% endif %} {% endif %} -A INPUT -m state --state NEW -s {{ ganglia_gmetad_host }} -p tcp -m tcp --dport {{ ganglia_gmond_cluster_port }} -j ACCEPT -A INPUT -s {{ ganglia_gmetad_host }} -p udp -m udp --dport {{ ganglia_gmond_cluster_port }} -j ACCEPT {% endif %} {% endif %} -{% endif %} +# Postfix {% if postfix_relay_server is defined %} {% if postfix_relay_server %} #