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 %}