Squid 3.5.20 - Imagem não carrega

1. Squid 3.5.20 - Imagem não carrega

Guilherme Henrique de Assis Martin
gui.h3000

(usa CentOS)

Enviado em 06/06/2018 - 11:11h

Bom dia,
Sou iniciante em CentOS, e instalei o squid 3.5.20 sem autenticação.
Efetuei as configurações no squid.conf com todas as regras de bloqueio e liberados, aparentemente tudo está funcionando da forma em que eu imaginava.
Mas algumas pagina por exemplo da Globo, Uol entre outras algumas imagens não estão sendo carregadas, fica totalmente desconfigurada.

Segue abaixo meu Squid.conf.

#
# Recommended minimum configuration:
#

visible_hostname mcblinpxy02.magna.global

#Erros em Portugues
error_directory /usr/share/squid/errors/pt-br

acl manager proto cache_object
#acl localnet src 127.0.0.1
acl localnet src 127.0.0.1/32
#acl to_localnet dst 127.0.0.1
acl to_localnet dst 127.0.0.0/8 0.0.0.0/32


# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed

acl localnet src 172.22.132.0/23 # RFC1918 possible internal network
acl localnet src 172.22.134.0/24 # RFC1918 possible internal network
acl localnet src 172.22.135.0/24 # RFC1918 possible internal network
acl localnet src 172.22.136.0/23 # RFC1918 possible internal network
acl localnet src 10.109.128.0/24 # RFC1918 possible internal network

#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#acl localnet src fc00::/7 # RFC 4193 local private network range
#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # 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

# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------

# TIPOS DE AUTENTICACAO

# NTLM

#auth_param ntlm program /usr/bin/ntlm_auth MAGNA.GLOBAL\MCBMSDC01 --helper-protocol=squid-2.5-ntlmssp
#external_acl_type nt_group %LOGIN /usr/lib64/squid/wbinfo_group.pl

# REGRAS DE AUTENTICACAO - INICIALIZAR

# ----------------
#acl AUTH_AD external nt_group MCB_Users

# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# ---------------- INICIO DAS REGRAS DE SITE LIBERADOS ------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------

#### LIBERADOS TODOS USUÁRIOS

# LIBERADOS ANTI-VIRUS
acl LIBERADOS_ANTIVIRUS dstdom_regex "/etc/squid/regras/liberados/liberados_antivirus"
http_access allow LIBERADOS_ANTIVIRUS

## LIBERADOS WEBMAIL - Sites de email (Gmail, Yahoo e etc)
acl LIBERADOS_WEBMAIL dstdom_regex "/etc/squid/regras/liberados/liberados_webmail"
http_access allow LIBERADOS_WEBMAIL

## LIBERADOS WEB APPLICATION - Sites de aplicativos (Bancos Geral, Adobe, Java e etc.)
acl LIBERADOS_WEBAPPLICATION dstdom_regex "/etc/squid/regras/liberados/liberados_webapplication"
http_access allow LIBERADOS_WEBAPPLICATION

## LIBERADOS SITES - Sites Diversos
acl LIBERADOS_SITES dstdom_regex "/etc/squid/regras/liberados/liberados_sites"
http_access allow LIBERADOS_SITES

##### DOWNLOADS LIBERADOS
# Libera Sites de Downloads Diversos (Adobe, Java e Updates Windows)

acl LIBERADOS_DOWNLOADS url_regex "/etc/squid/regras/downloads/permitidos"
http_access allow LIBERADOS_DOWNLOADS


# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# ------------ INICIO DAS REGRAS DE EXTENSOES, HAKING ----------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------


### EXTENSÕES

# Bloqueia Extensoes Diversos (.bat, .exe e etc)

acl BLOQUEADOS_VIRUS_EXTENSOES url_regex "/etc/squid/regras/virus/restritos_extensoes"
http_access deny BLOQUEADOS_VIRUS_EXTENSOES
#deny_info ERR_ACCESS_DENIED_VIRUS.html BLOQUEADOS_VIRUS_EXTENSOES


##### HACKING
# Bloqueia Sites em IPS relacionados a Hacking

acl BLOQUEADOS_HACKING_IP dstdom_regex "/etc/squid/regras/hacking/restritos_IP"
http_access deny BLOQUEADOS_HACKING_IP
#deny_info ERR_ACCESS_DENIED_HACKING.html BLOQUEADOS_HACKING_IP

# Bloqueia Sites URL relacionados a Hacking

acl BLOQUEADOS_HACKING url_regex "/etc/squid/regras/hacking/restritos_url"
http_access deny BLOQUEADOS_HACKING
#deny_info ERR_ACCESS_DENIED_HACKING.html BLOQUEADOS_HACKING


### VIRUS

# Bloqueia Dominios IP relacionados a Virus

acl BLOQUEADOS_VIRUS_IP dstdom_regex "/etc/squid/regras/virus/restritos_ips_dominios"
http_access deny BLOQUEADOS_VIRUS_IP
#deny_info ERR_ACCESS_DENIED_VIRUS.html BLOQUEADOS_VIRUS_IP

# Bloqueia Dominios URL relacionados a Virus

acl BLOQUEADOS_VIRUS_DOMINIOS url_regex "/etc/squid/regras/virus/restritos_dominios"
http_access deny BLOQUEADOS_VIRUS_DOMINIOS
#deny_info ERR_ACCESS_DENIED_VIRUS.html BLOQUEADOS_VIRUS_DOMINIOS


# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# ---------------- INICIO DAS REGRAS DE SITE BLOQUEADOS------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------


##### BLOGS
# Bloqueia Sites de Blogs Diversos

acl BLOQUEADOS_BLOGS url_regex "/etc/squid/regras/blogs/restritos"
http_access deny BLOQUEADOS_BLOGS
#deny_info ERR_ACCESS_DENIED_BLOGS.html BLOQUEADOS_BLOGS


##### COMPRAS
# Bloqueia Sites de Compras Diversos

acl BLOQUEADOS_COMPRAS url_regex "/etc/squid/regras/compras/restritos"
http_access deny BLOQUEADOS_COMPRAS
#deny_info ERR_ACCESS_DENIED_COMPRAS.html BLOQUEADOS_COMPRAS


##### CULINARIA
# Bloqueia Sites de Culinaria Diversos

acl BLOQUEADOS_CULINARIA url_regex "/etc/squid/regras/culinaria/restritos"
http_access deny BLOQUEADOS_CULINARIA
#deny_info ERR_ACCESS_DENIED_CULINARIA.html BLOQUEADOS_CULINARIA


##### DOWNLOADS BLOQUEADOS
# Bloqueia Sites de Downloads Diversos (Baixaki, 4Shared, Baixatudo e etc)

acl BLOQUEADOS_DOWNLOADS url_regex "/etc/squid/regras/downloads/restritos"
http_access deny BLOQUEADOS_DOWNLOADS
#deny_info ERR_ACCESS_DENIED_DOWNLOADS.html BLOQUEADOS_DOWNLOADS


##### DIVERSOS
# Bloqueia Sites e relacionados a Diversos (Fofocas, entretendimento e etc)

acl BLOQUEADOS_DIVERSOS url_regex "/etc/squid/regras/diversos/restritos"
http_access deny BLOQUEADOS_DIVERSOS
#deny_info ERR_ACCESS_DENIED_DIVERSOS.html BLOQUEADOS_DIVERSOS


##### DROGAS
# Bloqueia Sites e relacionados a Drogas

acl BLOQUEADOS_DROGAS url_regex "/etc/squid/regras/drogas/restritos"
http_access deny BLOQUEADOS_DROGAS
#deny_info ERR_ACCESS_DENIED_DROGAS.html BLOQUEADOS_DROGAS

# Bloqueia Dominios IP relacionados a Drogas

acl BLOQUEADOS_DROGAS_IP dstdom_regex "/etc/squid/regras/drogas/restritos_ip"
http_access deny BLOQUEADOS_DROGAS_IP
#deny_info ERR_ACCESS_DENIED_DROGAS.html BLOQUEADOS_DROGAS_IP


##### EMPREGOS
# Bloqueia Sites e relacionados a Empregos (Catho e etc)

acl BLOQUEADOS_EMPREGOS url_regex "/etc/squid/regras/empregos/restritos"
http_access deny BLOQUEADOS_EMPREGOS
#deny_info ERR_ACCESS_DENIED_EMPREGOS.html BLOQUEADOS_EMPREGOS


##### ESPORTES
# Bloqueia Sites e relacionados a Esportes (Globo Esportes, Lance, Cartola e etc)

acl BLOQUEADOS_ESPORTES url_regex "/etc/squid/regras/esportes/restritos"
http_access deny BLOQUEADOS_ESPORTES
#deny_info ERR_ACCESS_DENIED_ESPORTES.html BLOQUEADOS_ESPORTES


##### FOTOS
# Bloqueia Sites e relacionados a Fotos (gifs, book e etc)

acl BLOQUEADOS_FOTOS url_regex "/etc/squid/regras/fotos/restritos"
http_access deny BLOQUEADOS_FOTOS
#deny_info ERR_ACCESS_DENIED_FOTOS.html BLOQUEADOS_FOTOS


##### HOSPEDAGEM
# Bloqueia Sites e relacionados a Hospedagem (LocaWeb, HotelWeb e etc)

acl BLOQUEADOS_HOSPEDAGEM url_regex "/etc/squid/regras/hospedagem/restritos"
http_access deny BLOQUEADOS_HOSPEDAGEM
#deny_info ERR_ACCESS_DENIED_HOSPEDAGEM.html BLOQUEADOS_HOSPEDAGEM


##### JOGOS
# Bloqueia Sites e relacionados a Jogos (click jogos, jogos uol e etc)

acl BLOQUEADOS_JOGOS url_regex "/etc/squid/regras/jogos/restritos"
http_access deny BLOQUEADOS_JOGOS
#deny_info ERR_ACCESS_DENIED_JOGOS.html BLOQUEADOS_JOGOS


##### MUSICAS E RADIOS
# Bloqueia Sites e relacionados a Musicas (spotify, radio e etc)

acl BLOQUEADOS_MUSICAS url_regex "/etc/squid/regras/musicas/restritos"
http_access deny BLOQUEADOS_MUSICAS
#deny_info ERR_ACCESS_DENIED_MUSICAS.html BLOQUEADOS_MUSICAS

acl BLOQUEADOS_RADIOS url_regex "/etc/squid/regras/musicas/restritos_radios"
http_access deny BLOQUEADOS_RADIOS
#deny_info ERR_ACCESS_DENIED_MUSICAS.html BLOQUEADOS_RADIOS


##### PIADAS
# Bloqueia Sites e relacionados a Piadas

acl BLOQUEADOS_PIADAS url_regex "/etc/squid/regras/musicas/restritos"
http_access deny BLOQUEADOS_PIADAS
#deny_info ERR_ACCESS_DENIED_PIADAS.html BLOQUEADOS_PIADAS


##### PORNOGRAFIA
# Bloqueia Sites e relacionados a Pornografia

acl BLOQUEADOS_PORNOGRAFIA url_regex "/etc/squid/regras/pornografia/restritos"
http_access deny BLOQUEADOS_PORNOGRAFIA
#deny_info ERR_ACCESS_DENIED_PORNOGRAFIA.html BLOQUEADOS_PORNOGRAFIA

# Bloqueia nomes relacionados a Pornografias

acl BLOQUEADOS_PORNO_PALAVRAS dstdom_regex -i "/etc/squid/regras/pornografia/restritos_palavras"
http_access deny BLOQUEADOS_PORNO_PALAVRAS
#deny_info ERR_ACCESS_DENIED_PORNOGRAFIA.html BLOQUEADOS_PORNO_PALAVRAS


##### PROXY
# Bloqueia Sites e relacionados a PROXY

acl BLOQUEADOS_PROXY url_regex "/etc/squid/regras/proxy/restritos"
http_access deny BLOQUEADOS_PROXY
#deny_info ERR_ACCESS_DENIED_PROXY.html BLOQUEADOS_PROXY


##### RELIGIAO
# Bloqueia Sites e relacionados a RELIGIAO

acl BLOQUEADOS_RELIGIAO url_regex "/etc/squid/regras/religiao/restritos"
http_access deny BLOQUEADOS_RELIGIAO
#deny_info ERR_ACCESS_DENIED_RELIGIAO.html BLOQUEADOS_RELIGIAO


##### RELACIONAMENTOS E REDE SOCIAL
# Bloqueia Sites de Rede Sociais e Relacionamentos (Facebook, Tinder, Whatsapp, bate papos e etc)

acl BLOQUEADOS_RELACIONAMENTOS url_regex "/etc/squid/regras/relacionamentos/restritos"
http_access deny BLOQUEADOS_RELACIONAMENTOS
#deny_info ERR_ACCESS_DENIED_RELACIONAMENTOS.html BLOQUEADOS_RELACIONAMENTOS


##### TV ONLINE
# Bloqueia Sites e relacionados a TV ONLINE (TV_BOLA, TV_FILMEe etc)

acl BLOQUEADOS_TVONLINE url_regex "/etc/squid/regras/tvonline/restritos"
http_access deny BLOQUEADOS_TVONLINE
#deny_info ERR_ACCESS_DENIED_TV.html BLOQUEADOS_TVONLINE


##### WEB MAIL
# Bloqueia Sites e relacionados a WEB MAIL diversos

acl BLOQUEADOS_WEBMAIL url_regex "/etc/squid/regras/webmail/restritos"
http_access deny BLOQUEADOS_WEBMAIL
#deny_info ERR_ACCESS_DENIED_WEBMAIL.html BLOQUEADOS_WEBMAIL


# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -------------------- HORÁRIO DE ALMOÇO & JANTAR -----------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------

## HORARIO DE ALMOCO E JANTA
# Libera acesso aos sites que contém na lista 'liberados'(youtube, linkedin e etc)

acl net_local src 172.22.132.0/23
acl net_local src 172.22.134.0/24
acl net_local src 172.22.136.0/23
acl sites url_regex "/etc/squid/regras/almoco/liberados"

acl h_manha time MTWHF 00:01-12:00
acl h_tarde time MTWHF 13:30-19:30
acl h_noite time MTWHF 20:30-23:59
http_access deny net_local sites h_manha
http_access deny net_local sites h_tarde
http_access deny net_local sites h_noite
deny_info ERR_ACCESS_DENIED_MAGNA.html h_manha
deny_info ERR_ACCESS_DENIED_MAGNA.html h_tarde
deny_info ERR_ACCESS_DENIED_MAGNA.html h_noite


# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# ------------------------Configuração Squid-----------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access allow manager localnet
http_access deny manager

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all


# Squid normally listens to port 3128
http_port 3128

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 1024 16 384
cache_dir ufs /var/spool/squid 1024 16 384

#cache_mem 512 MB
cache_mem 512 MB

#maximum_object_size_in_memory 1024 KB
maximum_object_size_in_memory 1024 KB

minimum_object_size 0 KB
maximum_object_size 4096 KB


cache_swap_low 90
cache_swap_high 95

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# access logs
cache_access_log /var/log/squid/access.log


# Add any of your own refresh_pattern entries above these.
#
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
cache_effective_user squid
cache_effective_group squid


Abaixo segue meu Access.log durante a navegação. O que seria essa mensagem?: "1528293566.549 0 172.22.132.17 TCP_DENIED/403 4086 CONNECT sb.scorecardresearch.com:443 - HIER_NONE/- text/html "

1528293564.293 698 172.22.132.17 TCP_TUNNEL/200 3586 CONNECT horizon.globo.com:443 - HIER_DIRECT/131.0.25.68 -
1528293564.510 569 172.22.132.17 TCP_TUNNEL/200 2274 CONNECT tags.globo.com:443 - HIER_DIRECT/186.192.81.62 -
1528293564.595 8258 172.22.132.17 TCP_TUNNEL/200 1428 CONNECT pagead2.googlesyndication.com:443 - HIER_DIRECT/172.217.8.162 -
1528293564.596 8259 172.22.132.17 TCP_TUNNEL/200 1428 CONNECT pagead2.googlesyndication.com:443 - HIER_DIRECT/172.217.8.162 -
1528293564.743 457 172.22.132.17 TCP_TUNNEL/200 592 CONNECT s.glbimg.com:443 - HIER_DIRECT/186.192.91.5 -
1528293564.747 1157 172.22.132.17 TCP_TUNNEL/200 639 CONNECT www.google-analytics.com:443 - HIER_DIRECT/172.217.0.14 -
1528293564.749 496 172.22.132.17 TCP_TUNNEL/200 24122 CONNECT s3.glbimg.com:443 - HIER_DIRECT/186.192.90.3 -
1528293564.752 792 172.22.132.17 TCP_TUNNEL/200 747 CONNECT ade.googlesyndication.com:443 - HIER_DIRECT/172.217.4.194 -
1528293564.754 460 172.22.132.17 TCP_TUNNEL/200 452 CONNECT cdn.navdmp.com:443 - HIER_DIRECT/104.16.12.243 -
1528293564.756 1158 172.22.132.17 TCP_TUNNEL/200 58204 CONNECT g1.globo.com:443 - HIER_DIRECT/186.192.81.31 -
1528293564.983 232 172.22.132.17 TCP_TUNNEL/200 553 CONNECT s2.glbimg.com:443 - HIER_DIRECT/186.192.91.9 -
1528293564.985 231 172.22.132.17 TCP_TUNNEL/200 557 CONNECT s2.glbimg.com:443 - HIER_DIRECT/186.192.91.9 -
1528293564.986 695 172.22.132.17 TCP_TUNNEL/200 910 CONNECT beacon.krxd.net:443 - HIER_DIRECT/23.23.213.171 -
1528293565.039 54 172.22.132.17 TCP_TUNNEL/200 569 CONNECT s3.glbimg.com:443 - HIER_DIRECT/186.192.90.3 -
1528293565.097 114 172.22.132.17 TCP_TUNNEL/200 597 CONNECT s.glbimg.com:443 - HIER_DIRECT/186.192.91.5 -
1528293565.110 70 172.22.132.17 TCP_TUNNEL/200 556 CONNECT s2.glbimg.com:443 - HIER_DIRECT/186.192.91.9 -
1528293565.140 41 172.22.132.17 TCP_TUNNEL/200 557 CONNECT s2.glbimg.com:443 - HIER_DIRECT/186.192.91.9 -
1528293565.221 711 172.22.132.17 TCP_TUNNEL/200 6727 CONNECT s3.glbimg.com:443 - HIER_DIRECT/186.192.90.3 -
1528293565.279 168 172.22.132.17 TCP_TUNNEL/200 64389 CONNECT s2.glbimg.com:443 - HIER_DIRECT/186.192.91.9 -
1528293565.330 586 172.22.132.17 TCP_TUNNEL/200 4499 CONNECT s01.video.glbimg.com:443 - HIER_DIRECT/186.192.91.2 -
1528293565.376 780 172.22.132.17 TCP_TUNNEL/200 1070 CONNECT adservice.google.com:443 - HIER_DIRECT/172.217.8.162 -
1528293565.456 176 172.22.132.17 TCP_TUNNEL/200 9995 CONNECT s3.glbimg.com:443 - HIER_DIRECT/186.192.90.3 -
1528293566.432 1209 172.22.132.17 TCP_TUNNEL/200 25065 CONNECT s3.glbimg.com:443 - HIER_DIRECT/186.192.90.3 -
1528293566.548 1952 172.22.132.17 TCP_TUNNEL/200 985 CONNECT adservice.google.com.br:443 - HIER_DIRECT/172.217.8.162 -
1528293566.549 1218 172.22.132.17 TCP_TUNNEL/200 596 CONNECT s.videos.globo.com:443 - HIER_DIRECT/186.192.91.5 -
1528293566.549 0 172.22.132.17 TCP_DENIED/403 4086 CONNECT sb.scorecardresearch.com:443 - HIER_NONE/- text/html
1528293566.549 0 172.22.132.17 TCP_DENIED/403 4086 CONNECT sb.scorecardresearch.com:443 - HIER_NONE/- text/html
1528293566.550 1172 172.22.132.17 TCP_TUNNEL/200 39736 CONNECT s3.glbimg.com:443 - HIER_DIRECT/186.192.90.3 -
1528293566.932 2184 172.22.132.17 TCP_TUNNEL/200 555 CONNECT s2.glbimg.com:443 - HIER_DIRECT/186.192.91.9 -
1528293567.977 4028 172.22.132.17 TCP_TUNNEL/200 578 CONNECT s.glbimg.com:443 - HIER_DIRECT/186.192.91.5 -
1528293568.191 3050 172.22.132.17 TCP_TUNNEL/200 63177 CONNECT s3.glbimg.com:443 - HIER_DIRECT/186.192.90.3 -
1528293568.747 2314 172.22.132.17 TCP_TUNNEL/200 594 CONNECT p.glbimg.com:443 - HIER_DIRECT/186.192.91.5 -
1528293579.714 17406 172.22.132.17 TCP_TUNNEL/200 3895 CONNECT horizon.globo.com:443 - HIER_DIRECT/131.0.25.68 -
1528293579.812 15055 172.22.132.17 TCP_TUNNEL/200 553 CONNECT s2.glbimg.com:443 - HIER_DIRECT/186.192.91.9 -
1528293579.812 14355 172.22.132.17 TCP_TUNNEL/200 12382 CONNECT s.glbimg.com:443 - HIER_DIRECT/186.192.91.5 -
1528293581.239 16487 172.22.132.17 TCP_TUNNEL/200 554 CONNECT s2.glbimg.com:443 - HIER_DIRECT/186.192.91.9 -

Obrigado pela ajuda.


  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts