From 6a807aea8926839adf3df1e23d091b6b2cffae03 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 1 Aug 2022 12:26:58 +0200 Subject: [PATCH] Move some comments inside their conditionals. --- templates/iptables-rules.v4.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/iptables-rules.v4.j2 b/templates/iptables-rules.v4.j2 index d7426dc..e92dd99 100644 --- a/templates/iptables-rules.v4.j2 +++ b/templates/iptables-rules.v4.j2 @@ -129,8 +129,8 @@ {% endif %} {% if psql_firewall_enabled %} -# PostgreSQL {% if psql_db_port is defined %} +# PostgreSQL {% if psql_listen_on_ext_int is defined and psql_listen_on_ext_int %} {% if psql_global_firewall is defined %} {% for cidr in psql_global_firewall %} @@ -285,8 +285,8 @@ -A INPUT -m pkttype --pkt-type multicast -d {{ orientdb_hazelcast_multicast_group }} -j ACCEPT -A INPUT -m state --state NEW -s {{orientdb_hazelcast_multicast_group}} -p tcp -m tcp --dport {{ orientdb_hazelcast_multicast_port }} -j ACCEPT {% endif %} -# Postfix {% if postfix_relay_server is defined and postfix_relay_server%} +# Postfix # # These are only needed on the machines that act as relay servers # @@ -304,6 +304,7 @@ -A OUTPUT -p tcp -m multiport --dports 25,587,465 -j DROP {% endif %} {% if postfix_relay_client is defined and postfix_relay_client%} +# Postfix # # When we are not a relay server but we want send email using our relay -A OUTPUT -p tcp -m multiport --dports 25,587,465 -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT