Advertisement
Guest User

squid.conf

a guest
Sep 15th, 2016
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.69 KB | None | 0 0
  1. acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  2. acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
  3. acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
  4. acl localnet src fc00::/7 # RFC 4193 local private network range
  5. acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
  6.  
  7. acl SSL_ports port 443
  8. acl Safe_ports port 80 # http
  9. acl Safe_ports port 21 # ftp
  10. acl Safe_ports port 443 # https
  11. acl Safe_ports port 70 # gopher
  12. acl Safe_ports port 210 # wais
  13. acl Safe_ports port 1025-65535 # unregistered ports
  14. acl Safe_ports port 280 # http-mgmt
  15. acl Safe_ports port 488 # gss-http
  16. acl Safe_ports port 591 # filemaker
  17. acl Safe_ports port 777 # multiling http
  18. acl CONNECT method CONNECT
  19.  
  20. http_access allow localnet
  21. http_access allow localhost
  22.  
  23. # And finally deny all other access to this proxy
  24. http_access deny all
  25.  
  26.  
  27. http_port 3128
  28. http_port 3129 intercept
  29.  
  30. cache_dir ufs /cache 45000 16 256
  31.  
  32. acl updatesites dstdom_regex "/etc/squid/updatesites.txt"
  33.  
  34. cache allow updatesites
  35. cache deny all
  36.  
  37. maximum_object_size 5000 MB
  38. range_offset_limit -1
  39. quick_abort_min -1 KB
  40.  
  41. cache_store_log /var/log/squid/store.log
  42. access_log daemon:/var/log/squid/access.log squid
  43. cache_log /var/log/squid/cache.log
  44.  
  45. coredump_dir /cache
  46.  
  47. store_id_access allow updatesites
  48. store_id_access deny all
  49. store_id_program /lib/squid/storeid_file_rewrite /etc/squid/storeid_rewrite.conf
  50. store_id_children 30 startup=3 idle=1 concurrency=0
  51.  
  52. refresh_pattern ([^.]+.|)adobe.com/.*\.(zip|exe) 43200 100% 43200 reload-into-ims ignore-reload ignore-no-store override-expire override-lastmod
  53. refresh_pattern ([^.]+.|)java.com/.*\.(zip|exe) 43200 100% 43200 reload-into-ims ignore-reload ignore-no-store override-expire override-lastmod
  54. refresh_pattern ([^.]+.|)sun.com/.*\.(zip|exe) 43200 100% 43200 reload-into-ims ignore-reload ignore-no-store override-expire override-lastmod
  55. refresh_pattern ([^.]+.|)oracle.com/.*\.(zip|exe|tar.gz) 43200 100% 43200 reload-into-ims ignore-reload ignore-no-store override-expire override-lastmod
  56.  
  57. refresh_pattern ([^.]+.|)cs\.steampowered\.com 43200 100% 43200 reload-into-ims ignore-reload ignore-no-store override-expire override-lastmod
  58.  
  59. refresh_pattern -i appldnld\.apple\.com 43200 100% 43200 ignore-reload ignore-no-store override-expire override-lastmod
  60. refresh_pattern -i ([^.]+.|)apple.com/.*\.(ipa) 43200 100% 43200 ignore-reload ignore-no-store override-expire override-lastmod
  61.  
  62. refresh_pattern ([^.]+\.)?(download|(windows)?update)\.(microsoft\.)?com/.*\.(cab|exe|msi|msp|psf) 4320 100% 43200 reload-into-ims ignore-reload ignore-no-store override-expire override-lastmod
  63.  
  64. refresh_pattern -i ([^.]+.|)google.com/.*\.(exe|crx) 10080 80% 43200 override-expire override-lastmod ignore-no-cache ignore-reload reload-into-ims ignore-private
  65. refresh_pattern -i ([^.]+.|)gstatic.com/.*\.(exe|crx) 10080 80% 43200 override-expire override-lastmod ignore-no-cache ignore-reload reload-into-ims ignore-private
  66.  
  67. refresh_pattern -i ([^.]+.|)ubuntu.com/.*\.(deb) 10080 80% 43200 override-expire override-lastmod ignore-no-cache ignore-reload reload-into-ims ignore-private
  68.  
  69. refresh_pattern ^ftp: 144000 20% 1008000
  70. refresh_pattern -i \.(deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|tiff|pdf|uxx)$ 260000 100% 260009 override-expire
  71. refresh_pattern \? 0 0% 4320
  72. refresh_pattern . 0 20% 4320
  73.  
  74.  
  75. ##################################
  76. cat /etc/squid/updatesites.txt
  77. ([^.]+.|)adobe.com
  78. ([^.]+.|)java.com
  79. ([^.]+.|)sun.com
  80. ([^.]+.|)oracle.com
  81. ([^.]+.|)apple.com
  82. ([^.]+.|)apple.com
  83. ([^.]+\.)?(download|(windows)?update)\.(microsoft\.)?com
  84. ([^.]+.|)ubuntu.com
  85. ([^.]+.|)steampowered.com
  86. ([^.]+.|)google.com
  87. ([^.]+.|)gstatic.com
  88. ([^.]+.|)microsoft.com
  89. ([^.]+.|)windowsupdate.com
  90. #############################################################################################
  91. root@debian:~# cat /etc/squid/storeid_rewrite.conf
  92. ^http:\/\/.+?\.ws\.microsoft\.com\/.+?_([0-9a-z]{40})\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf|appx) http://wupdate.squid.local/$1
  93. ^http:\/\/.+?\.windowsupdate\.com\/.+?_([0-9a-z]{40})\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf|appx) http://wupdate.squid.local/$1
  94. ^http:\/\/[^\.]+\.cs\.steampowered\.com\/(.*) http://steamupdates.squid.internal/$1
  95. ^http:\/\/[^\.]+\.phobos\.apple\.com\/(.*) http://appupdates.apple.squid.internal/$1
  96. ^http:\/\/[^\.]+\.c\.android\.clients\.google\.com\/(.*) http://androidupdates.google.squid.internal/$1
  97. ###################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement