basic_squid.conf 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #
  2. # Recommended minimum configuration:
  3. #
  4. # Example rule allowing access from your local networks.
  5. # Adapt to list your (internal) IP networks from where browsing
  6. # should be allowed
  7. acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
  8. acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
  9. acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
  10. acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
  11. acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
  12. acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
  13. acl localnet src fc00::/7 # RFC 4193 local private network range
  14. acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
  15. acl SSL_ports port 443
  16. acl Safe_ports port 80 # http
  17. acl Safe_ports port 21 # ftp
  18. acl Safe_ports port 443 # https
  19. acl Safe_ports port 70 # gopher
  20. acl Safe_ports port 210 # wais
  21. acl Safe_ports port 1025-65535 # unregistered ports
  22. acl Safe_ports port 280 # http-mgmt
  23. acl Safe_ports port 488 # gss-http
  24. acl Safe_ports port 591 # filemaker
  25. acl Safe_ports port 777 # multiling http
  26. acl CONNECT method CONNECT
  27. auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
  28. auth_param basic realm proxy
  29. acl authenticated proxy_auth REQUIRED
  30. http_access allow authenticated
  31. #
  32. # Recommended minimum Access Permission configuration:
  33. #
  34. # Deny requests to certain unsafe ports
  35. http_access deny !Safe_ports
  36. # Deny CONNECT to other than secure SSL ports
  37. http_access deny CONNECT !SSL_ports
  38. # Only allow cachemgr access from localhost
  39. http_access allow localhost manager
  40. http_access deny manager
  41. # We strongly recommend the following be uncommented to protect innocent
  42. # web applications running on the proxy server who think the only
  43. # one who can access services on "localhost" is a local user
  44. #http_access deny to_localhost
  45. #
  46. # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
  47. #
  48. # Example rule allowing access from your local networks.
  49. # Adapt localnet in the ACL section to list your (internal) IP networks
  50. # from where browsing should be allowed
  51. http_access allow localnet
  52. http_access allow localhost
  53. # And finally deny all other access to this proxy
  54. http_access deny all
  55. # Squid normally listens to port 3128
  56. http_port 3128
  57. # Uncomment and adjust the following to add a disk cache directory.
  58. #cache_dir ufs /var/spool/squid 100 16 256
  59. # Leave coredumps in the first cache dir
  60. coredump_dir /var/spool/squid
  61. #
  62. # Add any of your own refresh_pattern entries above these.
  63. #
  64. refresh_pattern ^ftp: 1440 20% 10080
  65. refresh_pattern ^gopher: 1440 0% 1440
  66. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  67. refresh_pattern . 0 20% 4320