Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.73 KB | None | 0 0
  1. ###########################################
  2. # HIGH PERFORMANCE SQUID 2.7
  3. # GAILANET
  4. # Config date : 9 Mei 2010
  5. # FOR EDUCATIONAL PURPOSE ONLY!
  6. # credit to : imer@apistech
  7. ###########################################
  8.  
  9. # ACCESS CONTROLS
  10. # -----------------------------------------------------------------------------
  11.  
  12. acl QUERY urlpath_regex -i cgi-bin \? \.php$ \.asp$ \.shtml$ \.cfm$ \.cfml$ \.phtml$ \.php3$ localhost
  13. acl all src all
  14. acl manager proto cache_object
  15. acl localhost src 127.0.0.1/32
  16. acl to_localhost dst 127.0.0.0/8
  17. #acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  18. #acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
  19. acl localnet src 192.168.0.0/24 # RFC1918 possible internal network
  20. acl localnet src 192.168.100.0/24
  21. acl localnet src 192.168.3.0/24
  22. acl SSL_ports port 443 563 81
  23. acl Safe_ports port 21 70 80 210 280 443 488 563 591 631 777 901 81 3128 1025-65535
  24. acl CONNECT method CONNECT
  25. acl purge method PURGE
  26.  
  27. http_access allow manager localhost
  28. http_access deny manager
  29. http_access allow purge localhost
  30. http_access deny purge
  31. http_access deny !Safe_ports
  32. http_access deny CONNECT !SSL_ports
  33. http_access allow localnet
  34. http_access deny all
  35. http_reply_access allow all
  36. icp_access deny all
  37. htcp_access deny all
  38. htcp_clr_access deny all
  39. reply_body_max_size 0 allow all
  40.  
  41. # NETWORK OPTIONS
  42. # -----------------------------------------------------------------------------
  43.  
  44. http_port 3128 transparent
  45. zph_mode tos
  46. zph_local 48
  47. zph_sibling 0
  48. zph_parent 0
  49. zph_option 136
  50.  
  51. icp_port 0
  52. htcp_port 0
  53. snmp_port 0
  54. snmp_access deny all
  55.  
  56. # PARENT/SIBLING CACHE OPTIONS
  57. # -----------------------------------------------------------------------------
  58.  
  59. hierarchy_stoplist localhost cgi-bin \? localhost
  60.  
  61. # OPTIONS WHICH AFFECT THE CACHE SIZE
  62. # -----------------------------------------------------------------------------
  63.  
  64. cache_mem 8 MB
  65. maximum_object_size_in_memory 64 KB
  66. memory_replacement_policy heap GDSF
  67. cache_replacement_policy heap LFUDA
  68. cache_dir aufs /cache1 1000 4 256
  69. cache_dir aufs /cache2 1000 4 256
  70. cache_dir aufs /cache3 1000 4 256
  71. cache_dir aufs /cache4 1000 4 256
  72. cache_dir aufs /cache5 1000 4 256
  73. cache_dir aufs /cache6 1000 4 256
  74. cache_dir aufs /cache7 1000 4 256
  75. cache_dir aufs /cache8 1000 4 256
  76. cache_dir aufs /cache9 1000 4 256
  77. cache_dir aufs /cache10 1000 4 256
  78. maximum_object_size 128 MB
  79. cache_swap_low 90
  80. cache_swap_high 95
  81. update_headers off
  82.  
  83. # LOGFILE PATHNAMES AND CACHE DIRECTORIES
  84. # -----------------------------------------------------------------------------
  85.  
  86. access_log none
  87. # access_log /var/log/squid/access.log
  88. cache_log /dev/null
  89. cache_store_log none
  90. logfile_rotate 5
  91. log_ip_on_direct off
  92. log_icp_queries off
  93. buffered_logs off
  94. netdb_filename none
  95. pid_filename /var/run/squid.pid
  96.  
  97. # OPTIONS FOR TUNING THE CACHE
  98. # -----------------------------------------------------------------------------
  99.  
  100. cache deny QUERY
  101. refresh_pattern ^ftp: 1440 20% 10080
  102. refresh_pattern ^gopher: 1440 0% 1440
  103. refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)$ 10080 99% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth
  104. refresh_pattern -i \.(avi|wav|mid|mp?|mov|3gp|wm?|swf|flv|doc?|xls?|ppt?|pdf)$ 10080 95% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private ignore-auth
  105. refresh_pattern -i \.(iso|rpm|cab|deb|exe|ms?|zip|tar|gz|tgz|rar|bin|7z|nth|psd|sis)$ 10080 90% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private ignore-auth
  106. refresh_pattern -i \.(html|htm|css|js)$ 1440 75% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache
  107. refresh_pattern -i \.index.(html|htm)$ 0 50% 10080
  108. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  109. refresh_pattern . 0 50% 10080
  110.  
  111. quick_abort_max 0 KB
  112. quick_abort_pct 98
  113. store_avg_object_size 13 KB
  114.  
  115. # HTTP OPTIONS
  116. # -----------------------------------------------------------------------------
  117.  
  118. via on
  119. cache_vary on
  120. collapsed_forwarding on
  121. refresh_stale_hit 0 seconds
  122. ie_refresh off
  123. vary_ignore_expire on
  124. request_entities off
  125. header_access From deny all
  126. header_access Link deny all
  127. header_access Server deny all
  128. header_access Via deny all
  129. header_access X-Forwarded-For deny all
  130. relaxed_header_parser on
  131. server_http11 on
  132.  
  133. # TIMEOUTS
  134. # -----------------------------------------------------------------------------
  135.  
  136. forward_timeout 240 seconds
  137. connect_timeout 30 seconds
  138. peer_connect_timeout 5 seconds
  139. read_timeout 600 seconds
  140. request_timeout 60 seconds
  141. persistent_request_timeout 60 seconds
  142. client_lifetime 86400 seconds
  143. half_closed_clients off
  144. pconn_timeout 60 seconds
  145. shutdown_lifetime 10 seconds
  146.  
  147. # ADMINISTRATIVE PARAMETERS
  148. # -----------------------------------------------------------------------------
  149.  
  150. cache_mgr gaila
  151. cache_effective_user squid
  152. cache_effective_group squid
  153. httpd_suppress_version_string on
  154. visible_hostname squid
  155.  
  156. # DELAY POOL PARAMETERS
  157. # -----------------------------------------------------------------------------
  158.  
  159. # ADVANCED NETWORKING OPTIONS
  160. # -----------------------------------------------------------------------------
  161.  
  162. max_filedescriptors 4096
  163.  
  164. # DNS OPTIONS
  165. # -----------------------------------------------------------------------------
  166.  
  167. check_hostnames off
  168. dns_timeout 10 seconds
  169. dns_nameservers 58.145.171.2 58.145.171.4 8.8.8.8 8.8.4.4
  170. hosts_file /etc/hosts
  171. ignore_unknown_nameservers on
  172. ipcache_size 8192
  173. ipcache_low 90
  174. ipcache_high 95
  175. fqdncache_size 4096
  176.  
  177. # MISCELLANEOUS
  178. # -----------------------------------------------------------------------------
  179.  
  180. memory_pools off
  181. forwarded_for off
  182. client_db on
  183. reload_into_ims on
  184. offline_mode off
  185. coredump_dir /cache
  186. pipeline_prefetch on
  187.  
  188. # -=EoF=-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement