From b67cd918d13358299b440d60129fba42ea73efdf Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 19 Oct 2020 17:02:15 +0200 Subject: [PATCH] Fix the loop that adds the managed rules. --- templates/iptables-rules.v4.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/iptables-rules.v4.j2 b/templates/iptables-rules.v4.j2 index 0904922..16e92f0 100644 --- a/templates/iptables-rules.v4.j2 +++ b/templates/iptables-rules.v4.j2 @@ -295,9 +295,9 @@ {% endif %} {% if iptables.managed_any_rules is defined and iptables.managed_any_rules %} # ANY rules -{% for any_rule in iptables.any %} -{% for rule in any_rule.allowed_hosts %} --A INPUT {{ rule.iptables_rule | default('') }} -s {{ rule.ip }} -j {{ rule.policy | default('ACCEPT') }} +{% for rule in iptables.any %} +{% for ip in rule.allowed_hosts %} +-A INPUT {{ rule.iptables_rule | default('') }} -s {{ ip }} -j {{ rule.policy | default('ACCEPT') }} {% endfor %} {% endfor %} {% endif %}