Guest User

squid

a guest
Apr 11th, 2011
200
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##############################
  2. ##### Meu Primeiro Squid #####
  3. ##############################
  4.  
  5. acl manager proto cache_object
  6. acl localhost src 127.0.0.1/32
  7.  
  8.  
  9. ### REDE LOCAL ###
  10. acl localnet src 192.168.0.0/24
  11.  
  12.  
  13. ### ACL PORTAS ###
  14. acl all src 0.0.0.0/0.0.0.0
  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 #
  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.  
  28.  
  29. ### Sites Liberados ###
  30. acl sites.allow dstdomain "/etc/squid/sites.allow"
  31. http_access allow sites.allow
  32.  
  33. ### Sites Proibidos ###
  34. acl sites.deny dstdomain "/etc/squid/sites.deny"
  35. http_access deny sites.deny
  36.  
  37.  
  38. http_access allow manager localhost
  39. http_access deny manager
  40. http_access deny !Safe_ports
  41. http_access deny CONNECT !SSL_ports
  42. http_access allow localnet
  43. #http_access allow ldapauth
  44. http_access allow localhost
  45.  
  46.  
  47. ### Liberando sua rede local ###
  48. icp_access allow localnet
  49. http_access deny all
  50.  
  51. ### PORTA SQUID ###
  52. http_port 3128 transparent
  53. visible_hostname Global Network ### Ponha o nome do seu servidor.
  54.  
  55. hierarchy_stoplist cgi-bin ?
  56.  
  57. ### LOGS ###
  58. access_log /var/log/squid/access.log squid
  59. cache_log /var/log/squid/cache.log
  60.  
  61. ### DESEMPENHO/DISCO ###
  62. ## Se o seu servidor será somente firewall + squid, aconselho a deixar 50% da sua memória ram ##
  63. cache_mem 512 MB
  64.  
  65. ## O maximo em que ele fará cache na RAM ##
  66. maximum_object_size_in_memory 8 KB
  67.  
  68. ## Para ele limpar o cache RAM e cache DISCO automaticamente ##
  69. memory_replacement_policy lru
  70. cache_replacement_policy lru
  71.  
  72. ## Tamanho e diretório do cache. Aqui está em 60 GB ##
  73. cache_dir ufs /var/spool/squid 60000 16 256
  74.  
  75. ## Tamanho maximo do arquivo que ira ser armazenado em cache ( 200 MB ) ##
  76. maximum_object_size 200000 KB
  77.  
  78. icp_access allow all
  79.  
  80. ## Limpa cache quando chegar aos 95% dos 60 GB ##
  81. cache_swap_low 90
  82. cache_swap_high 95
  83.  
  84. ## Icones ##
  85. icon_directory /usr/share/squid/icons
  86. short_icon_urls on
  87.  
  88. ## Errors configuracao ##
  89. error_directory /usr/share/squid/errors/Portuguese
  90.  
  91. refresh_pattern ^ftp: 1440 20% 10080
  92. refresh_pattern ^gopher: 1440 0% 1440
  93. refresh_pattern (cgi-bin|\?) 0 0% 0
  94. refresh_pattern . 0 20% 4320
  95.  
  96. #Cache windowsupdate ( Faz cache do Windows Update ) ##
  97. refresh_pattern windowsupdate.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
  98. refresh_pattern download.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
  99. refresh_pattern www.download.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
  100. refresh_pattern www.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
  101. refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
  102. refresh_pattern download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
  103. refresh_pattern www.download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
RAW Paste Data