iptables: Fix deprecation warnings
This commit is contained in:
parent
354b5b293c
commit
f65e12037d
2 changed files with 4 additions and 4 deletions
|
@ -13,10 +13,10 @@
|
|||
{% for rule in firewall_in %}
|
||||
{% if rule.from is defined %}
|
||||
{% for from in rule.from %}
|
||||
{% if not from | ipv4 and not from | ipv6 %}
|
||||
{% if not from | ansible.utils.ipv4 and not from | ansible.utils.ipv6 %}
|
||||
{% set from = lookup('dig', from) %}
|
||||
{% endif %}
|
||||
{% if from | ipv6 %}
|
||||
{% if from | ansible.utils.ipv6 %}
|
||||
-A INPUT -m state --state NEW -m {{ rule.proto }} -p {{ rule.proto }} -s {{ from }} --dport {{ rule.port }} -j ACCEPT
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
{% for rule in firewall_in %}
|
||||
{% if rule.from is defined %}
|
||||
{% for from in rule.from %}
|
||||
{% if not from | ipv4 and not from | ipv6 %}
|
||||
{% if not from | ansible.utils.ipv4 and not from | ansible.utils.ipv6 %}
|
||||
{% set from = lookup('dig', from) %}
|
||||
{% endif %}
|
||||
{% if from | ipv4 %}
|
||||
{% if from | ansible.utils.ipv4 %}
|
||||
-A INPUT -m state --state NEW -m {{ rule.proto }} -p {{ rule.proto }} -s {{ from }} --dport {{ rule.port }} -j ACCEPT
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Reference in a new issue