Commit 1836bc5a authored by Jos Schellevis's avatar Jos Schellevis

(proxy) Add remoteblacklist to squid configuration

parent 21ba10e2
......@@ -105,7 +105,7 @@ acl whiteList url_regex {{element|replace(".","\.")}}
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %}
# ALC - Blacklist - User defined (blackList)
# ACL - Blacklist - User defined (blackList)
{% for element in OPNsense.proxy.forward.acl.blackList.split(",") %}
{% if '^' in element or '\\' in element or '$' in element or '[' in element %}
acl blackList url_regex {{element}}
......@@ -114,9 +114,18 @@ acl blackList url_regex {{element|replace(".","\.")}}
{% endif %}
{% endfor %}
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.browser') %}
# ACL - Remote fetched Blacklist (remoteblacklist)
{% if helpers.exists('OPNsense.proxy.forward.acl.remoteACLs.blacklists') %}
{% for blacklist in helpers.toList('OPNsense.proxy.forward.acl.remoteACLs.blacklists.blacklist') %}
{% if blacklist.enabled=='1' %}
acl remoteblacklist dstdom_regex "/usr/local/etc/squid/acl/{{blacklist.filename}}"
{% endif %}
{% endfor %}
{% endif %}
# ALC - Block browser/user-agent - User defined (browser)
{% if helpers.exists('OPNsense.proxy.forward.acl.browser') %}
{% for element in OPNsense.proxy.forward.acl.browser.split(",") %}
acl blockuseragents browser {{element}}
{% endfor %}
......@@ -182,6 +191,10 @@ http_access allow whiteList
#
# ACL list (Deny) blacklist
http_access deny blackList
# ACL list (Deny) remoteblacklist
http_access deny remoteblacklist
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.browser') %}
......
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