Update to 2022-08-01 16:00

This commit is contained in:
Daniel Berteaud
2022-08-01 16:00:18 +02:00
parent 1650198b44
commit 576eba31fe
11 changed files with 159 additions and 73 deletions

View File

@@ -6,10 +6,10 @@
state: "{{ (('tcp' in consul_services[item].proto or 'udp' in consul_services[item].proto) and consul_services[item].src_ip | length > 0) | ternary('present', 'absent') }}"
rules: |
{% if 'tcp' in consul_services[item].proto %}
-A INPUT -m state --state NEW -p tcp --dport {{ consul_services[item].port }} -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport {{ consul_services[item].port }} -s {{ consul_services[item].src_ip | join(',') }} -j ACCEPT
{% endif %}
{% if 'udp' in consul_services[item].proto %}
-A INPUT -m state --state NEW -p udp --dport {{ consul_services[item].port }} -j ACCEPT
-A INPUT -m state --state NEW -p udp --dport {{ consul_services[item].port }} -s {{ consul_services[item].src_ip | join(',') }} -j ACCEPT
{% endif %}
loop: "{{ consul_services.keys() | list }}"
tags: firewall,consul