Skip to content

Instantly share code, notes, and snippets.

@scumola
Created December 1, 2014 21:34
Show Gist options
  • Save scumola/cd28ca27230b58b29184 to your computer and use it in GitHub Desktop.
Save scumola/cd28ca27230b58b29184 to your computer and use it in GitHub Desktop.
squid.conf
acl snmppublic snmp_community public
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/24
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all
http_port 3128 transparent
cache_mem 256 MB
maximum_object_size_in_memory 1 MB
memory_replacement_policy lru
cache_replacement_policy heap LFUDA
cache_dir ufs /var/spool/squid3 10000 256 256
maximum_object_size 200 MB
cache_swap_low 90
cache_swap_high 95
cache_store_log /var/log/squid3/store.log
log_fqdn on
strip_query_terms off
buffered_logs off
debug_options ALL,1
coredump_dir /var/spool/squid3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern (\.deb|\.udeb)$ 129600 100% 129600
refresh_pattern \.mp4$ 129600 100% 129600
refresh_pattern . 0 20% 4320
quick_abort_min -1 KB
quick_abort_max 50 MB
quick_abort_pct 80
read_ahead_gap 1 MB
negative_ttl 10 seconds
negative_dns_ttl 1 minutes
range_offset_limit 0
via on
snmp_port 3401
snmp_access allow snmppublic localhost
snmp_access allow snmppublic localnet
snmp_access deny all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment