Fix the loop that adds the managed rules.

This commit is contained in:
Andrea Dell'Amico 2020-10-19 17:02:15 +02:00
parent 9aabbf2e1d
commit b67cd918d1
1 changed files with 3 additions and 3 deletions

View File

@ -295,9 +295,9 @@
{% endif %} {% endif %}
{% if iptables.managed_any_rules is defined and iptables.managed_any_rules %} {% if iptables.managed_any_rules is defined and iptables.managed_any_rules %}
# ANY rules # ANY rules
{% for any_rule in iptables.any %} {% for rule in iptables.any %}
{% for rule in any_rule.allowed_hosts %} {% for ip in rule.allowed_hosts %}
-A INPUT {{ rule.iptables_rule | default('') }} -s {{ rule.ip }} -j {{ rule.policy | default('ACCEPT') }} -A INPUT {{ rule.iptables_rule | default('') }} -s {{ ip }} -j {{ rule.policy | default('ACCEPT') }}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}