107 lines
3.8 KiB
Plaintext
107 lines
3.8 KiB
Plaintext
|
# Example expliciet proxy with url filter, without ssl bump
|
||
|
|
||
|
# Setup regular listeners configuration
|
||
|
http_port 3128 cert=/etc/squid/ssl/ca.pem dynamic_cert_mem_cache_size=10MB generate-host-certificates=on
|
||
|
|
||
|
sslcrtd_program /usr/libexec/squid/security_file_certgen -s /var/squid/ssl_crtd -M 10MB
|
||
|
sslcrtd_children 5
|
||
|
|
||
|
tls_outgoing_options options=NO_TLSv1 cipher=HIGH:MEDIUM:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS
|
||
|
|
||
|
sslproxy_cert_error deny all
|
||
|
|
||
|
# Example rule allowing access from your local networks.
|
||
|
# Adapt to list your (internal) IP networks from where browsing
|
||
|
# should be allowed
|
||
|
acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
|
||
|
acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
|
||
|
acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
|
||
|
acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
|
||
|
acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
|
||
|
acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
|
||
|
acl localnet src fc00::/7 # RFC 4193 local private network range
|
||
|
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
|
||
|
|
||
|
# ACL - Allow localhost for PURGE cache if enabled
|
||
|
acl PURGE method PURGE
|
||
|
http_access allow localhost PURGE
|
||
|
http_access deny PURGE
|
||
|
|
||
|
# ACL lists
|
||
|
# ACL - Remote fetched Blacklist (remoteblacklist)
|
||
|
acl remoteblacklist_ut1 dstdomain "/var/lib/squid/acl/URL"
|
||
|
|
||
|
# ACL - SSL ports, default are configured in config.xml
|
||
|
acl SSL_ports port 443 # https
|
||
|
acl SSL_ports port 8443 # special https
|
||
|
|
||
|
# Default Safe ports are now defined in config.xml
|
||
|
# ACL - Safe_ports
|
||
|
acl Safe_ports port 80 # http
|
||
|
acl Safe_ports port 21 # ftp
|
||
|
acl Safe_ports port 443 # https
|
||
|
acl Safe_ports port 70 # gopher
|
||
|
acl Safe_ports port 210 # wais
|
||
|
acl Safe_ports port 1025-65535 # unregistered ports
|
||
|
acl Safe_ports port 280 # http-mgmt
|
||
|
acl Safe_ports port 488 # gss-http
|
||
|
acl Safe_ports port 591 # filemaker
|
||
|
acl Safe_ports port 777 # multiling http
|
||
|
acl CONNECT method CONNECT
|
||
|
|
||
|
# ACL list (Deny) remoteblacklist_ut1
|
||
|
adaptation_access response_mod deny remoteblacklist_ut1
|
||
|
adaptation_access request_mod deny remoteblacklist_ut1
|
||
|
http_access deny remoteblacklist_ut1
|
||
|
|
||
|
# Deny requests to certain unsafe ports
|
||
|
adaptation_access response_mod deny !Safe_ports
|
||
|
adaptation_access request_mod deny !Safe_ports
|
||
|
http_access deny !Safe_ports
|
||
|
# Deny CONNECT to other than secure SSL ports
|
||
|
adaptation_access response_mod deny CONNECT !SSL_ports
|
||
|
adaptation_access request_mod deny CONNECT !SSL_ports
|
||
|
http_access deny CONNECT !SSL_ports
|
||
|
|
||
|
# Only allow cachemgr access from localhost
|
||
|
http_access allow localhost manager
|
||
|
http_access deny manager
|
||
|
|
||
|
# We strongly recommend the following be uncommented to protect innocent
|
||
|
# web applications running on the proxy server who think the only
|
||
|
# one who can access services on "localhost" is a local user
|
||
|
adaptation_access response_mod deny to_localhost
|
||
|
adaptation_access request_mod deny to_localhost
|
||
|
http_access deny to_localhost
|
||
|
|
||
|
#
|
||
|
# ACL - localnet - default these include ranges from selected interfaces (Allow local subnets)
|
||
|
adaptation_access response_mod allow localnet
|
||
|
adaptation_access request_mod allow localnet
|
||
|
http_access allow localnet
|
||
|
|
||
|
# ACL - localhost
|
||
|
adaptation_access response_mod allow localhost
|
||
|
adaptation_access request_mod allow localhost
|
||
|
http_access allow localhost
|
||
|
|
||
|
# Deny all other access to this proxy
|
||
|
adaptation_access response_mod deny all
|
||
|
adaptation_access request_mod deny all
|
||
|
http_access deny all
|
||
|
|
||
|
# Caching settings
|
||
|
cache_mem 512 MB
|
||
|
cache_dir ufs /var/cache/squid 100 16 256
|
||
|
|
||
|
# Leave coredumps in the first cache dir
|
||
|
coredump_dir /var/cache/squid
|
||
|
|
||
|
#
|
||
|
# Add any of your own refresh_pattern entries above these.
|
||
|
#
|
||
|
refresh_pattern ^ftp: 1440 20% 10080
|
||
|
refresh_pattern ^gopher: 1440 0% 1440
|
||
|
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
|
||
|
refresh_pattern . 0 20% 4320
|