From e0aee06fc85485a7b28f306a63aedf0b69454475 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 29 Dec 2022 18:41:26 +0100 Subject: [PATCH] Always set a multicast net. --- templates/iptables-rules.v4.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/iptables-rules.v4.j2 b/templates/iptables-rules.v4.j2 index c313b83..e9543a5 100644 --- a/templates/iptables-rules.v4.j2 +++ b/templates/iptables-rules.v4.j2 @@ -225,8 +225,10 @@ -A INPUT -m state --state NEW -p tcp -m tcp --dport {{ jgroups_multicast_port }} -j ACCEPT -A INPUT -p udp -m udp --dport {{ jgroups_multicast_port }} -j ACCEPT {% endif %} -{% if jgroups_multicast_net is defined %} --A INPUT -d {{ jgroups_multicast_net }} -j ACCEPT +{% if jgroups_sources is defined %} +{% for s in jgroups_sources %} +-A INPUT -d {{ jgroups_multicast_net | default('224.0.0.1') }} -j ACCEPT +{% endfor %} {% endif %} {% endif %}