Advertisement
Guest User

Squid 3.3.6 Config

a guest
Jul 8th, 2013
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.77 KB | None | 0 0
  1. #
  2. # Recommended minimum configuration:
  3. #
  4.  
  5. # Auth
  6. auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
  7. auth_param ntlm children 30
  8. auth_param ntlm keep_alive on
  9.  
  10. #auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
  11. #auth_param basic children 10
  12. #auth_param basic realm Squid Proxy Server
  13. #auth_param basic credentialsttl 2 hours
  14. #auth_param basic casesensitive off
  15.  
  16. authenticate_ttl 1 hour
  17. authenticate_cache_garbage_interval 10 minutes
  18.  
  19. # Example rule allowing access from your local networks.
  20. # Adapt to list your (internal) IP networks from where browsing
  21. # should be allowed
  22. acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  23. acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
  24. acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
  25. acl localnet src fc00::/7       # RFC 4193 local private network range
  26. acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
  27.  
  28. acl SSL_ports port 443
  29. acl Safe_ports port 80      # http
  30. acl Safe_ports port 21      # ftp
  31. acl Safe_ports port 443     # https
  32. acl Safe_ports port 70      # gopher
  33. acl Safe_ports port 210     # wais
  34. acl Safe_ports port 1025-65535  # unregistered ports
  35. acl Safe_ports port 280     # http-mgmt
  36. acl Safe_ports port 488     # gss-http
  37. acl Safe_ports port 591     # filemaker
  38. acl Safe_ports port 777     # multiling http
  39. acl FTP_ports port 21
  40. acl windowsupdate dstdomain windowsupdate.microsoft.com
  41. acl windowsupdate dstdomain .update.microsoft.com
  42. acl windowsupdate dstdomain download.windowsupdate.com
  43. acl windowsupdate dstdomain redir.metaservices.microsoft.com
  44. acl windowsupdate dstdomain images.metaservices.microsoft.com
  45. acl windowsupdate dstdomain c.microsoft.com
  46. acl windowsupdate dstdomain www.download.windowsupdate.com
  47. acl windowsupdate dstdomain wustat.windows.com
  48. acl windowsupdate dstdomain crl.microsoft.com
  49. acl CONNECT method CONNECT
  50. acl wuCONNECT dstdomain www.update.microsoft.com
  51. acl AuthorizedUsers proxy_auth REQUIRED
  52.  
  53. #
  54. # Recommended minimum Access Permission configuration:
  55. #
  56. http_access allow manager localhost
  57. http_access deny manager
  58. http_access deny !Safe_ports
  59. http_access deny CONNECT !SSL_ports
  60. http_access allow CONNECT wuCONNECT localnet
  61. http_access allow windowsupdate localnet
  62. http_access allow localnet
  63. http_access allow localhost
  64. http_access allow AuthorizedUsers
  65. http_access deny all
  66.  
  67. # Squid normally listens to port 3128
  68. http_port 3128
  69. #http_port 80 transparent
  70.  
  71. # Uncomment and adjust the following to add a disk cache directory.
  72. cache_dir ufs /usr/local/squid/var/cache/squid 51200 36 256
  73.  
  74. # Leave coredumps in the first cache dir
  75. coredump_dir /usr/local/squid/var/cache/squid
  76.  
  77. #
  78. # Add any of your own refresh_pattern entries above these.
  79. #
  80. refresh_pattern -i \.(html?\?.*)?$ 9440 90% 100000 override-expire reload-into-ims
  81. refresh_pattern -i \.(gif|bif|tiff|png|jpe?g|ico|bmp|webp)(\?.*)?$ 36000 90% 100000 override-expire reload-into-ims ignore-reload
  82. refresh_pattern \.(swf|swf\?|js|js\?|wav|css|css\?|class|dat|zsci)$ 36000 90% 100000 override-expire reload-into-ims
  83. refresh_pattern -i \.(bin|deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|docx|tiff|pdf|uxx|gz|xls|xlsx|psd|crl|msi|dll|dll\?|crx|enc|skl|arc)$ 36000 90% 100000 override-expire override-lastmod reload-into-ims ignore-reload
  84. refresh_pattern -i \.(xml)$ 0 90% 100000
  85. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  86. refresh_pattern ^ftp: 5440 90% 10080
  87. refresh_pattern ^gopher: 1440 0% 1440
  88. refresh_pattern -i . 0 90% 5760
  89. minimum_object_size 0 KB
  90. maximum_object_size 250 MB
  91. maximum_object_size_in_memory 1 MB
  92. client_db off
  93. cache_mem 768 MB
  94. memory_pools on
  95.  
  96. access_log /usr/local/squid/var/logs/access.log
  97. cache_store_log /usr/local/squid/var/logs/store.log
  98.  
  99. dns_nameservers 8.8.8.8
  100. dns_nameservers 127.0.0.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement