Advertisement
MLWALK3R

Squid Config 25/01/14 --15:00

Jan 25th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. acl QUERY urlpath_regex -i cgi-bin \? \.php$ \.asp$ \.shtml$ \.cfm$ \.cfml$ \.phtml$ \.php3$ localhost
  2.  
  3. http_port 3128
  4. acl all src all
  5. acl lan src 172.16.0.0/16
  6. http_access allow lan
  7.  
  8. acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901 81 3128 1025-65535
  9. acl sslports port 443 563 81 2087 10000
  10. acl purge method PURGE
  11. acl connect method CONNECT
  12.  
  13. acl ad-block url_regex -i "/etc/squid3/ad_block.txt"
  14. http_access deny ad-block
  15. deny_info TCP_RESET ads
  16.  
  17. acl localnet dst 172.16.0.0/16
  18. cache deny localnet
  19.  
  20.  
  21. acl NO-CACHE-SITES dstdomain "/etc/squid3/not-to-cache-sites.txt"
  22. no_cache deny NO-CACHE-SITES
  23. cache deny NO-CACHE-SITES
  24.  
  25.  
  26.  
  27. acl m4s url_regex .m4s$
  28. cache deny m4s
  29. no_cache deny m4s
  30.  
  31. acl PURGE method PURGE
  32. acl localhost src 127.0.0.1
  33. http_access allow PURGE localhost
  34. http_access deny PURGE
  35.  
  36.  
  37. #
  38. # NETWORK OPTIONS
  39. # —————
  40. #
  41. http_port 3128 transparent
  42. #
  43. # OPTIONS WHICH AFFECT THE CACHE SIZE
  44. # ==============================
  45. #
  46. cache_mem 1024 MB
  47. maximum_object_size_in_memory 1024 KB
  48. memory_replacement_policy heap GDSF
  49. cache_replacement_policy heap LFUDA
  50. cache_dir ufs /var/spool/squid 10000 14 256
  51. maximum_object_size 128000 KB
  52. cache_swap_low 95
  53. cache_swap_high 99
  54. #
  55. # LOGFILE PATHNAMES AND CACHE DIRECTORIES
  56. # ==================================
  57. #
  58. access_log /var/log/squid3/access.log
  59. cache_log /cache/cache.log
  60. #cache_log /dev/null
  61. cache_store_log none
  62. logfile_rotate 5
  63. log_icp_queries off
  64. #
  65. # OPTIONS FOR TUNING THE CACHE
  66. # ========================
  67. #
  68. refresh_pattern ^ftp: 1440 20% 10080 reload-into-ims
  69. refresh_pattern ^gopher: 1440 0% 1440
  70. refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
  71. refresh_pattern -i \.(rpm|cab|deb|exe|msi|msu|zip|tar|xz|bz|bz2|lzma|gz|tgz|rar|bin|7z|doc?|xls?|ppt?|pdf|nth|psd|sis)$ 10080 90% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
  72. refresh_pattern -i \.(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)$ 43200 95% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
  73. refresh_pattern -i \.(html|htm|css|js)$ 1440 75% 40320
  74. refresh_pattern -i \.index.(html|htm)$ 0 75% 10080
  75. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  76. refresh_pattern . 1440 90% 10080
  77.  
  78. cache deny QUERY
  79. cache allow all
  80.  
  81. #
  82. quick_abort_min 0 KB
  83. quick_abort_max 0 KB
  84. quick_abort_pct 100
  85. store_avg_object_size 13 KB
  86. #
  87. # HTTP OPTIONS
  88. # ===========
  89. vary_ignore_expire on
  90. #
  91. # ANONIMITY OPTIONS
  92. # ===============
  93. #
  94. request_header_access From deny all
  95. request_header_access Server deny all
  96. request_header_access Link deny all
  97. request_header_access Via deny all
  98. request_header_access X-Forwarded-For deny all
  99. #
  100. # TIMEOUTS
  101. # =======
  102. #
  103. forward_timeout 240 second
  104. connect_timeout 30 second
  105. peer_connect_timeout 5 second
  106. read_timeout 600 second
  107. request_timeout 60 second
  108. shutdown_lifetime 10 second
  109. #
  110. # ADMINISTRATIVE PARAMETERS
  111. # =====================
  112. #
  113. cache_mgr ninja
  114. cache_effective_user proxy
  115. cache_effective_group proxy
  116. httpd_suppress_version_string on
  117. visible_hostname ninja
  118. #
  119. #
  120. # DNS OPTIONS
  121. # ==========
  122. #
  123. dns_timeout 5 seconds
  124. dns_nameservers 127.0.0.1 172.16.0.3 # DNS Server
  125. #
  126. # MISCELLANEOUS
  127. # ===========
  128. #
  129. memory_pools off
  130. client_db off
  131. reload_into_ims on
  132. coredump_dir /cache
  133. pipeline_prefetch on
  134. offline_mode off
  135. #
  136.  
  137. ## disable ads ( http://pgl.yoyo.org/adservers/ )
  138. #acl ads dstdom_regex "/etc/squid3/ad_block.txt"
  139. #http_access deny ads
  140. #deny_info TCP_RESET ads
  141. ### END CONFIGURATION ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement