Squid não Cacheando [RESOLVIDO]

1. Squid não Cacheando [RESOLVIDO]

EduardoAlvarenga
ealvarenga_f

(usa Debian)

Enviado em 02/08/2016 - 18:27h

Pessoal,

favor me orientarem dentro da possibilidade, pois estou sofrendo para resolver o motivo do porque meu SQUID não esta cacheando direito.
Já teste navegação de HTTP e Download, meu Cache aumenta praticamente nada, quando baixo um arquivo de 10MB, deveria aumentar meu cache em 10MB, porém isso não ocorre.

Meu Servidor:
Dell Power Edge T110 II
Memoria 2 GB
HD 500 GB
OS.: debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux


Segue meu SQUID.CONF na integra
###### SQUID VERSAO 3.4.8

### IP e Porta que escuta o squid
http_port 10.1.1.1:3128 intercept
https_port 10.1.1.1:3129 transparent ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid3/certificado/portoseco.pem
ssl_bump server-first all
always_direct allow all
sslcrtd_program /usr/lib/squid3/ssl_crtd -s /etc/squid3/certificado/ssl_db -M 4MB
#icp_port 0 # Nao tem proxy segundario

### Definido o Cache de Memoria
cache_mem 512 MB
maximum_object_size_in_memory 512 KB
memory_pools on
memory_replacement_policy heap lru
#memory_replacement_policy heap GDSF
memory_cache_shared on

### Definino o Cache HD
cache_dir aufs /var/spool/squid3 62048 32 512
cache_dir diskd /var/spool/cache 35900 32 512 Q1=64 Q2=72
maximum_object_size 800 MB
minimum_object_size 0 KB
cache_replacement_policy heap lru
#cache_replacement_policy heap LFUDA

### Tempo Vida do Cache
cache_swap_low 90
cache_swap_high 95
ipcache_size 1024
ipcache_low 90
ipcache_high 93

### Continuar Download apos Abortadas
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100

### Conteudo Dinamico nao colocar em Cache
#acl QUERY urlpath_regex cgi-bin \?
#no_cache deny QUERY

### Regra atualiza cache
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

### Registro LOG
cache_access_log /var/log/squid3/access.log
access_log /var/log/squid3/access.log
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
debug_options 28,1

### Idioma
error_directory /usr/share/squid3/errors/pt-br/

### Configurações Auxiliares
positive_dns_ttl 30 minutes # Tempo de vida consulta DNS
forwarded_for off # Desativado envio de IPADDRESS Interno
detect_broken_pconn on # Resolve problema Delay no Cache
pipeline_prefetch on # Para melhorar ganho de performance vai trabalhar com 2 filas
negative_ttl 5 minutes # Tempo voltar buscas sites não encontrado
strip_query_terms off # Desligado envia ao LOG endereço completo do site
half_closed_clients off # Fecha conexão se socket ficar sem informação
never_direct allow all # Força squid buscar em cache

### Regras gerenciamento e portas
acl SSL_ports port 443 # https
acl Safe_ports port 80 8080 # http
acl Safe_ports port 8800 8082 # SkeyLine - Folha Pagamento Caixa
acl Safe_ports port 3080 3050 5001 4004 # Banco Santander
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 403 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow localhost

### Cache Windows Update
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|msi) 10080 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe|msi) 10080 100% 43200 reload-into-ims
refresh_pattern msgruser.dlservice.microsoft.com/.*\.(cab|exe|msi) 10080 100% 43200 reload-into-ims
refresh_pattern windowsupdate.com/.*\.(cab|exe|msi) 10080 100% 43200 reload-into-ims
refresh_pattern www.microsoft.com/.*\.(cab|exe|msi) 10080 100% 43200 reload-into-ims

### Acesso Total a Internet - Nivel 1
acl completo arp "/etc/squid3/regras/completo"
http_access allow completo

### Bloqueando Conteudo - Nivel 2
acl bloqueadourl dstdomain "/etc/squid3/regras/bloqueado" # Bloqueia conteudo
http_access deny bloqueadourl
#acl negadown urlpath_regex -i "/etc/squid3/regras/negadown" # Bloqueia download por extensão
#http_access deny negadown
#acl negaexpressao url_regex "/etc/squid3/regras/negaexpressao" # Bloqueia site por palavra
#http_access deny negaexpressao

## Cache Windows Update
acl streaming req_mime_type ^video/x-ms-asf
acl proibir_musica urlpath_regex -i \.aif$ \.aifc$ \.aiff$ \.asf$ \.asx$ \.avi$ \.au$ \.m3u$ \.med$ \.mp3$ \.m1v$ \.mp2$ \.mp2v$ \.mpa$ \.mov$ \.mpe$ \.mpg$ \.mpeg$ \.ogg$ \.pls$ \.ram$ \.ra$ \.ram$ \.snd$ \.wma$ \.wmv$ \.wvx$ \.mid$ \.midi$ \.rmi$

http_access deny proibir_musica
http_reply_access deny streaming
### Acesso com Restrinção - Nivel 3
acl controle arp "/etc/squid3/regras/controle" # Acesso Controlado pelo nivel 2
http_access allow controle

### Acesso Restrito - Nivel 4
acl basico url_regex "/etc/squid3/regras/basico"
http_access deny !basico

### Rede Liberado
acl redelocal src 10.1.1.0/24
http_access allow redelocal

### Nega Acesso Geral
http_access deny all

### Concluindo
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
mail_program mail
cache_effective_user proxy
cache_effective_group proxy
httpd_suppress_version_string off
visible_hostname proxy.local
cache_mgr e-mail@gmail.com

Esta tudo navegando correto, as regras de restrições estão funcionando. somente o CACHE não ocorre como deveria.

parte do LOG abaixo
1470172816.369 687 10.1.1.225 TCP_MISS/200 7521 GET http://ads.rubiconproject.com/ad/11976.js - ORIGINAL_DST/23.45.3.153 text/javascript
1470172816.369 687 10.1.1.225 TCP_MISS/200 7521 GET http://ads.rubiconproject.com/ad/11976.js - ORIGINAL_DST/23.45.3.153 text/javascript
1470172817.706 79 10.1.1.225 TCP_MISS/200 1323 GET http://b.scorecardresearch.com/beacon.js - ORIGINAL_DST/200.174.107.26 application/x-javascript
1470172817.706 79 10.1.1.225 TCP_MISS/200 1323 GET http://b.scorecardresearch.com/beacon.js - ORIGINAL_DST/200.174.107.26 application/x-javascript
1470172820.236 153 10.1.1.225 TCP_MISS/304 677 GET http://imguol.com/admanager/customer/35.jpg - ORIGINAL_DST/200.147.4.50 image/jpeg
1470172820.236 153 10.1.1.225 TCP_MISS/304 677 GET http://imguol.com/admanager/customer/35.jpg - ORIGINAL_DST/200.147.4.50 image/jpeg
1470172820.246 160 10.1.1.225 TCP_MISS/304 675 GET http://imguol.com/admanager/customer/59.jpg - ORIGINAL_DST/200.147.4.50 image/jpeg
1470172820.246 160 10.1.1.225 TCP_MISS/304 675 GET http://imguol.com/admanager/customer/59.jpg - ORIGINAL_DST/200.147.4.50 image/jpeg
1470172820.246 159 10.1.1.225 TCP_MISS/304 651 GET http://imguol.com/admanager/1607/ads/59/59479.gif - ORIGINAL_DST/200.147.4.50 image/gif
1470172820.246 159 10.1.1.225 TCP_MISS/304 651 GET http://imguol.com/admanager/1607/ads/59/59479.gif - ORIGINAL_DST/200.147.4.50 image/gif
1470172820.247 162 10.1.1.225 TCP_MISS/304 653 GET http://imguol.com/admanager/1507/ads/35/56119.gif - ORIGINAL_DST/200.147.4.50 image/gif
1470172820.247 162 10.1.1.225 TCP_MISS/304 653 GET http://imguol.com/admanager/1507/ads/35/56119.gif - ORIGINAL_DST/200.147.4.50 image/gif
1470172820.248 156 10.1.1.225 TCP_MISS/304 649 GET http://imguol.com/admanager/1608/ads/178/59492.gif - ORIGINAL_DST/200.147.4.50 image/gif
1470172046.806 0 10.1.1.225 TCP_IMS_HIT/200 791 GET http://s.dynad.net/stack/KMA9C2O70iP6CHSgXk0LGakpYboY3uBSOgotXt8fklCKbdvX2viwKa3R7j7SBAOi.appcache - HIER_NONE/- text/cache-manifest
1470172046.806 0 10.1.1.225 TCP_IMS_HIT/200 791 GET http://s.dynad.net/stack/KMA9C2O70iP6CHSgXk0LGakpYboY3uBSOgotXt8fklCKbdvX2viwKa3R7j7SBAOi.appcache - HIER_NONE/- text/cache-manifest
1470172054.671 0 10.1.1.225 TCP_IMS_HIT/200 791 GET http://s.dynad.net/stack/KMA9C2O70iP6CHSgXk0LGakpYboY3uBSOgotXt8fklCKbdvX2viwKa3R7j7SBAOi.appcache - HIER_NONE/- text/cache-manifest
1470172054.671 0 10.1.1.225 TCP_IMS_HIT/200 791 GET http://s.dynad.net/stack/KMA9C2O70iP6CHSgXk0LGakpYboY3uBSOgotXt8fklCKbdvX2viwKa3R7j7SBAOi.appcache - HIER_NONE/- text/cache-manifest
1470172054.910 0 10.1.1.225 TCP_IMS_HIT/200 791 GET http://s.dynad.net/stack/KMA9C2O70iP6CHSgXk0LGakpYboY3uBSOgotXt8fklCKbdvX2viwKa3R7j7SBAOi.appcache - HIER_NONE/- text/cache-manifest

Deveria ter HIT_MEM; mas no caso o CACHE esta sendo feito e detectado pelo Browser, veja em TCP_IMS_HIT


  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts