From 88c07be2ae181ee0375c38d6f47c60a72be5955c Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Fri, 24 Apr 2015 11:16:53 +0200 Subject: [PATCH] Proxy work in progress, change mathinh on white and blacklists --- .../service/templates/OPNsense/Proxy/squid.conf | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index 2d0c90bdc..07576013b 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -77,7 +77,7 @@ acl bannedHosts src {{ip}} {% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %} # ALC - Whitelist - User defined (whiteList) {% 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}} {% else %} acl dstdomain {{element}} @@ -88,7 +88,7 @@ acl dstdomain {{element}} # ALC - Blacklist - User defined (blackList) {% 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}} {% else %} acl blackList dstdomain {{element}} @@ -150,6 +150,13 @@ acl local_auth proxy_auth REQUIRED # ACL list (Allow) unrestricted http_access allow unrestricted {% 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') %} # @@ -187,12 +194,6 @@ http_access deny manager # one who can access services on "localhost" is a local user 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: #