From 1836bc5a2dcc3407df17ae7236e727da557555e8 Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Thu, 2 Jul 2015 09:58:21 +0200 Subject: [PATCH] (proxy) Add remoteblacklist to squid configuration --- .../service/templates/OPNsense/Proxy/squid.conf | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index 91c2a5897..52ca2830f 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -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') %}