+ Responder ao Tópico



  1. #1

    Post Squid com muito TCP_MISS

    Estou com uma dúvida cruel rsrs
    Será que meu Cache está trabalhando de maneira correta ?
    Ao Consultar o access.log Só recebo TCP_MISS ...

    Versão do meu squid: 3.1.19 acho.


    A Topologia de minha rede é a seguinte:


    Bullet(Link) > RB Mikrotik > Porta 1 : Link | Porta 2: Servidor Cache Squid Ubuntu Server | Porta 3 e 4 : Clientes


    As Regras Nat já estão configuradas para redirecionar as requisições da porta 80 para o Cache e o acesso está tudo ok. Todos com internet.


    E também não está fazendo cache de Downloads... Configurei meu Squid com base no seguinte vídeo:


    Segue a baixo um Pedaço do access.log
    -----
    PS: Copiei somente o trecho onde mostra as requisições do Avast, mais o restante e qualquer outra requisição também fica em MISS

    1387901178.013 84629 192.168.4.151 TCP_MISS/200 304 GET http://su.ff.avast.com/R/A0YKIDJh - DIRECT/77.234.42.56 application/octet-stream
    1387901220.540 1021 192.168.4.141 TCP_MISS/200 543 GET http://su.ff.avast.com/R/A1MKIDAzo424-ASA== - DIRECT/77.234.41.55 application/octet-stream
    1387901263.021 84512 192.168.4.151 TCP_MISS/200 304 GET http://su.ff.avast.com/R/A0YKIDJhAC - DIRECT/77.234.42.56 application/octet-stream
    1387901347.175 1509 192.168.4.141 TCP_MISS/200 458 GET http://su.ff.avast.com/R/A1MKIDAzo424-ASA== - DIRECT/77.234.43.65 application/octet-stream
    1387901347.543 354 192.168.4.141 TCP_MISS/200 532 GET http://su.ff.avast.com/R/A04KIDAz= - DIRECT/77.234.43.65 application/octet-stream
    1387901348.116 561 192.168.4.141 TCP_MISS/200 630 GET http://su.ff.avast.com/R/A04KIDAzAo= - DIRECT/77.234.43.65 application/octet-stream
    1387901380.692 117483 192.168.4.151 TCP_MISS/200 304 GET http://su.ff.avast.com/R/A0YKIDJhAGIAC - DIRECT/77.234.42.56 application/octet-stream
    1387901392.022 11279 192.168.4.151 TCP_MISS/200 1048 GET http://su.ff.avast.com/R/A0YKIDJIAC - DIRECT/77.234.42.56 application/octet-stream
    1387901548.077 930 192.168.4.141 TCP_MISS/200 542 GET http://su.ff.avast.com/R/A1MKIDAzo424-ASA== - DIRECT/77.234.44.52 application/octet-stream
    1387901548.431 342 192.168.4.141 TCP_MISS/200 1101 GET http://su.ff.avast.com/R/A04KIDAgAo= - DIRECT/77.234.44.52 application/octet-stream
    1387901610.752 112570 192.168.4.151 TCP_MISS/200 304 GET http://su.ff.avast.com/R/A04KIDJhg= - DIRECT/77.234.43.65 application/octet-stream
    1387901636.400 860 192.168.4.141 TCP_MISS/200 505 GET http://su.ff.avast.com/R/A1MKIDAz0yCggA== - DIRECT/77.234.44.52 application/octet-stream
    1387901636.780 365 192.168.4.141 TCP_MISS/200 5020 GET http://su.ff.avast.com/R/A00YgAo= - DIRECT/77.234.44.52 application/octet-stream


    ---- PS: Em alguns Momentos recebo o Status TCP_REFRESH_HIT e/ou TCP_MEM_HIT, mais o TCP_MISS aparece em digamos 90 ~ % das requisições :/


    Ao consultar o cache.log recebo o seguinte:
    ----


    2013/12/24 13:04:35| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 10: (92) Protocol not available
    2013/12/24 13:05:52| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 10: (92) Protocol not available
    2013/12/24 13:05:55| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 10: (92) Protocol not available
    2013/12/24 13:05:56| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 10: (92) Protocol not available
    2013/12/24 13:05:57| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 10: (92) Protocol not available
    2013/12/24 13:06:59| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 10: (92) Protocol not available
    2013/12/24 13:09:05| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 10: (92) Protocol not available
    2013/12/24 13:11:38| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 10: (92) Protocol not available
    2013/12/24 13:12:27| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 13: (92) Protocol not available
    2013/12/24 13:13:55| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 13: (92) Protocol not available
    2013/12/24 13:14:29| IpIntercept.cc(137) NetfilterInterception: NF getsockopt(SO_ORIGINAL_DST) failed on FD 13: (92) Protocol not available


    ----
    Meu squid.conf está como abaixo:
    ----
    # A porta padrao do squid e a 3128, ela pode ser alterada.
    http_port 5128 intercept
    visible_hostname webproxy
    dns_nameservers 8.8.8.8
    dns_nameservers 8.8.4.4
    dns_nameservers 208.67.222.222
    dns_nameservers 208.67.220.220


    cache_access_log /var/log/squid3/access.log
    error_directory /usr/share/squid3/errors/Portuguese


    #CONFIGURA??O DO CACHE
    #memoria reservada para o cache, coloque um valor de prefer?ncia 40%
    # do total da sua maquina.
    cache_mem 800 MB


    #maximo tamanho dos arquivo cache na memoria
    maximum_object_size_in_memory 512 KB


    #tamanho maximo dos arquivo cache no HD
    # no exemplo usaremos 100MB que ser?o armazenados no HD, mais do que isso est? di$


    maximum_object_size 100 MB
    minimum_object_size 0 KB


    #regra que comeca esvaziar / substituir arquivos no cache em 90%
    cache_swap_low 90
    cache_swap_high 95


    #indicacao de localizacao da pasta de arquivos cache e em sequencia valor
    #total em MB de espaco no hd a ser usado pelo cache, numero de pastas, e
    #numero de subpastas do cache.
    #no exemplo estamos com um cache de 100GB, com 64 pastas, e 512 subpastas.


    cache_dir ufs /var/spool/squid3 51200 64 512


    #quick_abort_min -1
    #cache_replacement_policy heap GDSF
    #memory_replacement_policy heap GDSF
    #half_closed_clients off


    #memory_pools on
    #memory_pools_limit 92 MB


    # ZPH
    #zph_mode tos
    #zph_local 0x10
    #zph_sibling 0x10
    #zph_parent 0x10
    #zph_option 1


    #intervalos de tempos que o proxy verificara os arquivos dos site acessado
    #conferem com o do cache, o valor 4560 significa 04 dias


    refresh_pattern ^ftp: 15 20% 4560
    refresh_pattern ^gopher: 15 0% 4560
    refresh_pattern . 15 20% 4560


    #FIM DO CACHE


    #ACL?s GERAIS
    acl all src all
    acl manager proto cache_object
    acl localhost src 127.0.0.1
    acl to_localhost dst 127.0.0.0/8


    #ACL?s PORTAS
    acl SSL_ports port 443 563 873
    acl Safe_ports port 80
    acl Safe_ports port 21
    acl Safe_ports port 443 563
    acl Safe_ports port 70 #protocolo gopher antig??acl Safe_ports port 210 #whais
    acl Safe_ports port 1024-65535 #todas as outras portas
    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 #multi http
    acl Safe_ports port 901 #acesso Swat
    acl purge method PURGE
    acl CONNECT method CONNECT


    #HTTP - ACESSOS LOCAIS
    http_access allow manager localhost
    http_access deny manager
    http_access allow purge localhost
    http_access deny purge
    http_access deny !Safe_ports
    http_access allow CONNECT !SSL_PORTS
    http_access allow localhost


    ######## PERSONALIZADAS #########
    ##### REDES #####


    acl redelocal src 192.168.10.2
    acl clientes src 192.168.4.0/32
    #acl definir_acl src definir rede


    # LIBERADOS
    http_access allow redelocal
    http_access allow clientes


    # TAMANHO LIMITE DE DOWNLOAD - 30 Mb por download
    # com essas linhas descomentadas (#), o download maximo ? de 30MB.


    #acl html rep_mime_type text/html
    #acl video rep_mime_type video/x-flv
    #reply_body_max_size 0 deny html
    #reply_body_max_size 0 deny video
    #reply_body_max_size 30485760 deny all


    # BLOQUEIO INTERNET POR SETOR # SO DESCOMENTAR A LINHA


    #http_access deny clientes
    #http_access deny definir_rede
    #http_access deny definir_rede


    #BLOQUEIA TUDO
    #http_access deny all
    http_access allow all
    Última edição por erivelton42; 24-12-2013 às 17:57.