Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
1836bc5a
Commit
1836bc5a
authored
Jul 02, 2015
by
Jos Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(proxy) Add remoteblacklist to squid configuration
parent
21ba10e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
squid.conf
src/opnsense/service/templates/OPNsense/Proxy/squid.conf
+15
-2
No files found.
src/opnsense/service/templates/OPNsense/Proxy/squid.conf
View file @
1836bc5a
...
...
@@ -105,7 +105,7 @@ acl whiteList url_regex {{element|replace(".","\.")}}
{%
endif
%}
{%
if
helpers
.
exists
(
'OPNsense.proxy.forward.acl.blackList'
) %}
# A
LC
- Blacklist - User defined (blackList)
# A
CL
- 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'
) %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment