Commit 88c07be2 authored by Jos Schellevis's avatar Jos Schellevis

Proxy work in progress, change mathinh on white and blacklists

parent 7773bb31
...@@ -77,7 +77,7 @@ acl bannedHosts src {{ip}} ...@@ -77,7 +77,7 @@ acl bannedHosts src {{ip}}
{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %} {% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
# ALC - Whitelist - User defined (whiteList) # ALC - Whitelist - User defined (whiteList)
{% for element in OPNsense.proxy.forward.acl.whiteList.split(",") %} {% for element in OPNsense.proxy.forward.acl.whiteList.split(",") %}
{% if '^' or '\\' or '$' or '[' in element %} {% if ('^' or '\\' or '$' or '[') in element %}
acl whiteList url_regex {{element}} acl whiteList url_regex {{element}}
{% else %} {% else %}
acl dstdomain {{element}} acl dstdomain {{element}}
...@@ -88,7 +88,7 @@ acl dstdomain {{element}} ...@@ -88,7 +88,7 @@ acl dstdomain {{element}}
# ALC - Blacklist - User defined (blackList) # ALC - Blacklist - User defined (blackList)
{% for element in OPNsense.proxy.forward.acl.blackList.split(",") %} {% for element in OPNsense.proxy.forward.acl.blackList.split(",") %}
{% if '^' or '\\' or '$' or '[' in element %} {% if ('^' or '\\' or '$' or '[') in element %}
acl url_regex {{element}} acl url_regex {{element}}
{% else %} {% else %}
acl blackList dstdomain {{element}} acl blackList dstdomain {{element}}
...@@ -150,6 +150,13 @@ acl local_auth proxy_auth REQUIRED ...@@ -150,6 +150,13 @@ acl local_auth proxy_auth REQUIRED
# ACL list (Allow) unrestricted # ACL list (Allow) unrestricted
http_access allow unrestricted http_access allow unrestricted
{% endif %} {% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
# ACL list (Allow) whitelist
http_access allow whiteList
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %} {% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %}
# #
...@@ -187,12 +194,6 @@ http_access deny manager ...@@ -187,12 +194,6 @@ http_access deny manager
# one who can access services on "localhost" is a local user # one who can access services on "localhost" is a local user
http_access deny to_localhost http_access deny to_localhost
{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
# ACL list (Allow) whitelist
http_access allow whiteList
{% endif %}
# #
# Access Permission configuration: # Access Permission configuration:
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment