Skip to content
Snippets Groups Projects
Verified Commit e736b0fa authored by blallo's avatar blallo
Browse files

Fix firewall support

parent caee8e9e
No related branches found
No related tags found
1 merge request!258Support new syntax in haproxy
......@@ -19,7 +19,8 @@ add_rule -A vpn-{{ tinc_net }}-input -p tcp --dport {{ ep.port }} -j ACCEPT
{% endfor %}
{% for ep in services[s].get('public_tcp_endpoints', {}) %}
{% for port in ep.get('ports', []) %}
add_rule -A vpn-{{ tinc_net }}-input -p tcp --dport {{ port }} -j ACCEPT
{% set public = port.public | default(port) %}
add_rule -A vpn-{{ tinc_net }}-input -p tcp --dport {{ public }} -j ACCEPT
{% endfor %}
{% if 'port' in ep %}
add_rule -A vpn-{{ tinc_net }}-input -p tcp --dport {{ ep.port }} -j ACCEPT
......
......@@ -2,7 +2,8 @@
{% for ep in service.get('public_tcp_endpoints', []) %}
{% if ep.get('ports', []) %}
{% for port in ep.ports %}
allow_port tcp {{ port }}
{% set public = port.public | default(port) %}
allow_port tcp {{ public }}
{% endfor %}
{% else %}
allow_port tcp {{ ep.public_port | default(ep.port) }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment