chore: update to use ipset for port list

This commit is contained in:
2024-08-19 12:05:45 +00:00
parent d2ecad5ad2
commit fdf80b1b6c
3 changed files with 19 additions and 9 deletions

View File

@@ -7,5 +7,13 @@ create {{ whitelist_ip6_name }} hash:ip family inet6
{% for white_ip6 in whitelist_ip6 %}
add {{ whitelist_ip6_name }} {{ white_ip6 }}
{% endfor %}
create {{ whitelist_ports_tcp }} bitmap:port range 0-65535
{% for port_tcp in whitelist_public_tcp_port %}
add {{ whitelist_ports_tcp }} {{ port_tcp }}
{% endfor %}
create {{ whitelist_ports_udp }} bitmap:port range 0-65535
{% for port_udp in whitelist_public_udp_port %}
add {{ whitelist_ports_udp }} {{ port_udp }}
{% endfor %}
{{ ansible_managed | comment }}