diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf index 489848f5f..1e15b0ac5 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf @@ -43,7 +43,12 @@ {% for acl in action_data.linkedAcls.split(",") %} {% set acl_data = helpers.getUUID(acl) %} {% set acl_enabled = '1' %} -{% do action_acls.append('acl_' ~ acl_data.id) %} +{# # first check if this ACL condition should be negated #} +{% if acl_data.negate|default("") == '1' %} +{% do action_acls.append('!acl_' ~ acl_data.id) if acl_data.negate|default("") == '1' %} +{% else %} +{% do action_acls.append('acl_' ~ acl_data.id) %} +{% endif %} {# # check if this ACL was already defined in this scope #} {% if acl_data.id in acls_seen %} {# # DEBUG: ignoring duplicate ACL {{acl_data.name}} #}