Jeremiah_

Redes

Nov 26th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.04 KB | None | 0 0
  1. ### ARQUIVO DE CONFIGURACAO DO SQUID ###
  2.  
  3. ## DEFINE A PORTA DE CONEXAO DO SQUID
  4. http_port 3128
  5.  
  6. ## DEFINE O TAMANHO MAXIMO DE UM OBJETO PARA SER ARMAZENADO EM CACHE ##
  7. maximum_object_size 4096 KB
  8.  
  9. ## DEFINE O TAMANHO MINIMO DE UM OBJETO PARA SER ARMAZENADO EM CACHE ##
  10. minimum_object_size 0 KB
  11.  
  12. ## DEFINE O TAMANHO MAXIMO DE UM OBJETO PARA SER ARMAZENADO EM CACHE DE MEMORIA ##
  13. maximum_object_size_in_memory 64 KB
  14.  
  15. ## DEFINE A QUANTIDADE DE MEMORIA RAM A SER ALOCADA PARA CACHE ##
  16. cache_mem 512 MB
  17.  
  18. ## AJUSTA A PERFORMANCE EM CONEXOES PIPELINE ##
  19. pipeline_prefetch on
  20.  
  21. ## CACHE DE FQDN ##
  22. fqdncache_size 1024
  23.  
  24. ## OPCOES DE REFRESH PATTERN ##
  25. refresh_pattern ^ftp: 1440 20% 10080
  26. refresh_pattern ^gopher: 1440 0% 1440
  27. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  28. refresh_pattern . 0 20% 4320
  29.  
  30. ## DEFINE A PORCENTAGEM DO USO DO CACHE ##
  31. cache_swap_low 90
  32. cache_swap_high 95
  33.  
  34. ## ARQUIVO DE LOGS DO SQUID ##
  35. access_log /var/log/squid/access.log squid
  36. cache_log /var/log/squid/cache.log
  37. cache_store_log /var/log/squid/store.log
  38.  
  39. ## DEFINE O LOCAL DO CACHE ##
  40. cache_dir ufs /var/spool/squid 1600 16 256
  41.  
  42. ## CONTROLE DE ROTACAO DOS ARQUIVOS DE LOGS ##
  43. logfile_rotate 10
  44.  
  45. ## ARQUIVO ONDE CONTEM OS ENDERECOS LOCAIS DA REDE ##
  46. hosts_file /etc/hosts
  47.  
  48. ## ACLS - PORTAS PADROES LIBERADAS ##
  49. acl SSL_ports port 80 #HTTP
  50. acl SSL_ports port 443 #HTTPS
  51. acl Safe_ports port 80 # http
  52. acl Safe_ports port 21 # ftp
  53. acl Safe_ports port 443 # https
  54. acl Safe_ports port 70 # gopher
  55. acl Safe_ports port 210 # wais
  56. acl Safe_ports port 1025-65535 # unregistered ports
  57. acl Safe_ports port 280 # http-mgmt
  58. acl Safe_ports port 488 # gss-http
  59. acl Safe_ports port 591 # filemaker
  60. acl Safe_ports port 777 # multiling http
  61. acl CONNECT method CONNECT
  62.  
  63. ### DEFININDO MODO DE AUTENTICACAO
  64. auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/usuarios
  65. auth_param basic children 5
  66. auth_param basic realm "DIGITE SEU USUARIO E SENHA PARA ACESSO A INTERNET:"
  67. auth_param basic credentialsttl 2 hours
  68. auth_param basic casesensitive off
  69.  
  70. ### ACL PARA GARANTIR A AUTENTICACAO DO USUARIO NOS SITES ###
  71. acl autenticados proxy_auth REQUIRED
  72.  
  73. ## BLOQUEIA O ACESSO UNSAFE PORTS ##
  74. http_access deny !Safe_ports
  75.  
  76. ## Deny CONNECT to other than secure SSL port ##
  77. http_access deny CONNECT !SSL_ports
  78.  
  79. ## SITES BLOQUEADOS PARA ACESSO ##
  80. acl sites-bloqueados url_regex -i "/etc/squid/regras/sites_bloqueados"
  81.  
  82. ## SITES LIBERADOS PARA ACESSO ##
  83. acl sites-liberados url_regex -i "/etc/squid/regras/sites_liberados"
  84.  
  85. ## DEFININDO A ORDEM DAS REGRAS - ACLS ##
  86. http_access deny sites-bloqueados
  87. http_access allow autenticados
  88. http_access allow sites-liberados
  89. http_access deny all
  90. http_reply_access allow all
  91. icp_access allow all
  92. miss_access allow all
  93.  
  94. ## NOME QUE IRA APARECER NA TELA DE ERRO OU BLOQUEIO DO SQUID ##
  95. visible_hostname proxy.tidahora.com.br
  96.  
  97. ## DIRETORIO DAS PAGINAS DE ERROS ##
  98. error_directory /usr/share/squid/errors/pt-br
  99.  
  100. ## OUTRAS OPCOES DE CACHE ##
  101. cache_effective_user proxy
  102. coredump_dir /var/spool/squid
Advertisement
Add Comment
Please, Sign In to add comment