|
| 1 | +# WELCOME TO SQUID 6.6 |
| 2 | +# ---------------------------- |
| 3 | +# |
| 4 | +# This is the documentation for the Squid configuration file. |
| 5 | +# This documentation can also be found online at: |
| 6 | +# http://www.squid-cache.org/Doc/config/ |
| 7 | +# |
| 8 | +# You may wish to look at the Squid home page and wiki for the |
| 9 | +# FAQ and other documentation: |
| 10 | +# http://www.squid-cache.org/ |
| 11 | +# https://wiki.squid-cache.org/SquidFaq |
| 12 | +# https://wiki.squid-cache.org/ConfigExamples |
| 13 | +# |
| 14 | + |
| 15 | +# Example rule allowing access from your local networks. |
| 16 | +# Adapt to list your (internal) IP networks from where browsing |
| 17 | +# should be allowed |
| 18 | +acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN) |
| 19 | +acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN) |
| 20 | +acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN) |
| 21 | +acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines |
| 22 | +acl localnet src 172.0.0.0/8 |
| 23 | +acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN) |
| 24 | +acl localnet src fc00::/7 # RFC 4193 local private network range |
| 25 | +acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines |
| 26 | + |
| 27 | +acl SSL_ports port 443 |
| 28 | +acl Safe_ports port 80 # http |
| 29 | +acl Safe_ports port 81 |
| 30 | +acl Safe_ports port 443 # https |
| 31 | + |
| 32 | +# |
| 33 | +# Recommended minimum Access Permission configuration: |
| 34 | +# |
| 35 | +# Deny requests to certain unsafe ports |
| 36 | +http_access deny !Safe_ports |
| 37 | + |
| 38 | +# Deny CONNECT to other than secure SSL ports |
| 39 | +http_access deny CONNECT !SSL_ports |
| 40 | + |
| 41 | +# Only allow cachemgr access from localhost |
| 42 | +http_access allow localhost manager |
| 43 | +http_access deny manager |
| 44 | + |
| 45 | +# This default configuration only allows localhost requests because a more |
| 46 | +# permissive Squid installation could introduce new attack vectors into the |
| 47 | +# network by proxying external TCP connections to unprotected services. |
| 48 | +http_access allow localhost |
| 49 | + |
| 50 | +# The two deny rules below are unnecessary in this default configuration |
| 51 | +# because they are followed by a "deny all" rule. However, they may become |
| 52 | +# critically important when you start allowing external requests below them. |
| 53 | + |
| 54 | +# Protect web applications running on the same server as Squid. They often |
| 55 | +# assume that only local users can access them at "localhost" ports. |
| 56 | +http_access deny to_localhost |
| 57 | + |
| 58 | +# Protect cloud servers that provide local users with sensitive info about |
| 59 | +# their server via certain well-known link-local (a.k.a. APIPA) addresses. |
| 60 | +http_access deny to_linklocal |
| 61 | + |
| 62 | +# |
| 63 | +# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS |
| 64 | +# |
| 65 | +include /etc/squid/conf.d/*.conf |
| 66 | + |
| 67 | +# For example, to allow access from your local networks, you may uncomment the |
| 68 | +# following rule (and/or add rules that match your definition of "local"): |
| 69 | +# http_access allow localnet |
| 70 | + |
| 71 | +# And finally deny all other access to this proxy |
| 72 | +http_access deny all |
| 73 | + |
| 74 | +# Squid normally listens to port 3128 |
| 75 | +http_port 3128 |
| 76 | + |
| 77 | +# Leave coredumps in the first cache dir |
| 78 | +coredump_dir /var/spool/squid |
| 79 | + |
| 80 | +# |
| 81 | +# Add any of your own refresh_pattern entries above these. |
| 82 | +# |
| 83 | +refresh_pattern ^ftp: 1440 20% 10080 |
| 84 | +refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 |
| 85 | +refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims |
| 86 | +refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims |
| 87 | +refresh_pattern \/InRelease$ 0 0% 0 refresh-ims |
| 88 | +refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims |
| 89 | +# example pattern for deb packages |
| 90 | +#refresh_pattern (\.deb|\.udeb)$ 129600 100% 129600 |
| 91 | +refresh_pattern . 0 20% 4320 |
| 92 | + |
0 commit comments