mauriciop
(usa Outra)
Enviado em 22/09/2011 - 09:31h
Pessoal, já pesquisei muito mas não achei uma resposta satisfatória para a resolução deste problema. Quando o usuário digita
http://mail.google.com o squid bloqueia, porém, quando digito
https://mail.google.com o squid deixa passar (o mesmo acontece com o facebook), tenho que bloquear os acessos a algumas páginas https, mas não a todas, pois não posso bloquear os bancos. Já estou com esse problemas há alguns dias e não consigo sanar, se alguém tiver uma luz ficarei agradecido.
Bom, utilizo o squid 3.0 STABLE19. Não utilizo o iptables. O squid faz consulta em uma base LDAP para autenticar os usuários. OS é Ubuntu 10.04 LTS.
Abaixo segue o meu squid.conf, porém sem as opções de autenticação, pois não vejo necessidade de colocá-las. Desde já agradeço a toda ajuda que puderem fornecer.
######################################################################################################################################
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
http_port 3128
ipcache_size 1024
ipcache_low 90
ipcache_high 95
cache_replacement_policy lru
memory_replacement_policy lru
#### NEWS ###
authenticate_ttl 0 seconds
forward_timeout 4 minutes
connect_timeout 3 minutes
peer_connect_timeout 90 seconds
read_timeout 15 minutes
request_timeout 5 minutes
persistent_request_timeout 3 minutes
client_lifetime 1 day
half_closed_clients on
pconn_timeout 120 seconds
ident_timeout 10 seconds
shutdown_lifetime 30 seconds
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
hosts_file /etc/hosts
cache_mem 1024 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid3 2048 32 512
maximum_object_size 102400 KB
#maximum_object_size 8192 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 20 KB
access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
pid_filename /var/log/squid3/squid3.pid
mime_table /usr/share/squid3/mime.conf
memory_pools off
unlinkd_program /usr/lib/squid3/unlinkd
#cache deny QUERY
#UPDATE the default refresh_patterns:
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
quick_abort_max 16 KB
quick_abort_pct 95
quick_abort_min 16 KB
request_header_max_size 20 KB
reply_header_max_size 20 KB
request_body_max_size 0 KB
# Numero de FQDN cache entries
fqdncache_size 1024
acl manager proto cache_object
acl webserver src 10.1.0.15/255.255.255.255
http_access allow manager webserver
http_access deny manager
acl to_localhost dst 127.0.0.0/8
acl network src 10.1.0.0/16
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl SSL_ports port 443 21 # https
acl Safe_ports port 20 # ftp-data
acl Safe_ports port 21 # ftp
acl Safe_ports port 25 # smtp
acl Safe_ports port 70 # gopher
acl Safe_ports port 80 # http
acl Safe_ports port 110 # pop3
acl Safe_ports port 210 # wais
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 443 8443 # https
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 631 # cups
acl Safe_ports port 777 # multiling http
acl Safe_ports port 2631 # Conectividade Social
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl Safe_ports port 8070 # DIMEP - controle de ponto
acl Safe_ports port 1025-65535 # unregistered ports
acl CONNECT method CONNECT
always_direct allow all
http_access deny CONNECT !Safe_ports
http_access deny to_localhost
external_acl_type global_group children=10 %LOGIN /usr/lib/squid3/wbinfo_group.pl
######################################################################################################################################################################
refresh_pattern -i \.(mp3|mp4|m4a|ogg|mov|avi|wmv)$ 10080 90% 999999 ignore-no-cache override-expire ignore-private
acl videos dstdomain .portalava.com.br
cache allow videos
############################################################REGRAS DE ACESSO LINKDATA S/A ###############################################################################
################ Horários #########################
acl Almoco time MTWHF 12:00-14:00
acl Manha time MTWHF 07:00-08:00
##################################################
################# ACL's de Grupo #################
##################################################
################# Grupo Liberados #################
acl AcessoTotal external global_group "/etc/squid3/grupos/AcessoTotal"
acl AcessoGereh external global_group "/etc/squid3/grupos/AcessoGereh"
acl AcessoGefin external global_group "/etc/squid3/grupos/AcessoGefin"
acl AcessoEmail external global_group "/etc/squid3/grupos/AcessoEmail"
acl AcessoDownload external global_group "/etc/squid3/grupos/AcessoDownload"
################# Grupo Restritos #################
acl AcessoRestrito external global_group "/etc/squid3/grupos/AcessoRestrito"
acl AcessoPadrao external global_group "/etc/squid3/grupos/AcessoPadrao"
acl AcessoEstagiario external global_group "/etc/squid3/grupos/AcessoEstagiario"
################# Sites Bloqueados #################
acl BlockSites url_regex -i "/etc/squid3/acls/BlockSites"
acl BlockChulas dstdom_regex -i "/etc/squid3/acls/BlockChulas"
#Bloquear HTTPS
acl BlockSSL url_regex -i "/etc/squid3/acls/BlockSSL"
http_access allow SSL_ports !BlockSSL
################ Sites Liberados ###################
acl UnblockChulas url_regex -i "/etc/squid3/acls/UnblockChulas"
acl UnblockIps url_regex -i "/etc/squid3/acls/UnblockIps"
acl SitesGereh url_regex -i "/etc/squid3/acls/SitesGereh"
acl SitesGefin url_regex -i "/etc/squid3/acls/SitesGefin"
acl SitesEmail url_regex -i "/etc/squid3/acls/SitesEmail"
acl UnblockSites url_regex -i "/etc/squid3/acls/UnblockSites"
################## Libera Download #############
acl liberar_download urlpath_regex -i \.rar \.zip \.jar \.doc
############### Bloqueia Navagação por IP ###############
acl Bloqueia_Navegacao_via_IP url_regex [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
################# Bloqueia Streaming e download ##########
acl streaming rep_mime_type ^video/x-ms-asf
acl proibir_download urlpath_regex -i \.aif \.aifc \.aiff \.asf \.asx \.avi \.au \.m3u \.med \.mp3 \.m1v \.mp2 \.mp2v \.mpa \.mov \.mpg \.mpeg \.ogg \.pls \.ram \.ra \.ram \.snd \.wma \.wmv \.wvx \.mid \.midi \.rmi \.mp4 \.exe \.msi \.vqf \.tar \.gz \.zip \.rar \.ram \.rm \.iso \.wav \.mov \.tar.gz \.dmg \.sh$ \.flv
#http_access allow liberar_download proibir_download
################# Bloqueia MSN #################
acl libmsnmessenger url_regex -i gateway.dll
acl msn dstdomain loginnet.passport.com
acl msn1 req_mime_type -i ^application/x-msn-messenger$
acl msn2 dstdomain messenger.hotmail.com
acl msn3 dstdomain gateway.messenger.hotmail.com
################# BLOQUEAR GTALK ###########################
acl gtalk url_regex -i .mail.google.com/mail/channel/bind
acl gtalk url_regex -i .talk.google.com:443
acl gtalk url_regex -i .talk.google.com:5222
acl gtalk url_regex -i .desktop.google.com/download/googletalk/google-talk-versioncheck.txt?
acl gtalk url_regex -i .chatenabled.mail.google.com
acl gtalk url_regex -i .talkx.l.google.com
acl gtalk url_regex -i .talkgadget.google.com
acl gtalk url_regex -i .tools.google.com
acl gtalk url_regex -i .filetransferenabled.mail.google.com
################# Libera Conectividade Social #################
acl cscaixa url_regex "/etc/squid3/acls/cscaixa.txt"
no_cache deny cscaixa
always_direct allow cscaixa
acl cscaixaIP src "/etc/squid3/acls/cscaixaIP.txt"
http_access allow cscaixaIP
################# Autorizacoes e bloqueios de Acesso #################
http_access allow AcessoTotal
http_access allow UnblockIps
http_access allow UnblockChulas
http_access allow AcessoEmail SitesEmail !BlockSites
http_access deny BlockChulas
http_access allow AcessoDownload liberar_download !BlockSites
http_access deny AcessoEstagiario !UnblockSites
http_access allow AcessoRestrito Manha
http_access allow AcessoRestrito Almoco
http_access deny Bloqueia_Navegacao_via_IP
http_access deny proibir_download
http_access allow AcessoGefin SitesGefin
http_access allow AcessoGereh SitesGereh
http_access allow AcessoPadrao !BlockSites
http_access allow AcessoRestrito UnblockSites !BlockSites
http_reply_access deny streaming
http_access deny gtalk
http_access deny msn
http_access deny msn1
http_access deny msn2
http_access deny msn3
http_access deny libmsnmessenger
http_access allow AcessoPadrao !BlockSites
http_access deny all
################### Limite Banda Download #######################
delay_pools 2 # Significa que teremos dois controles de banda
delay_class 1 2 # Primeira Classe
delay_parameters 1 -1/-1 -1/-1 # -1/-1 significa que não teremos limites para a delay pool 1
delay_access 1 allow AcessoTotal
delay_class 2 2 # Segundo controle
delay_parameters 2 40000/40000 40000/40000
delay_access 2 allow AcessoDownload
# LOGFILE PATHNAMES AND CACHE DIRECTORIES
logformat meu_log %>a - Username: %un - Horario: [%tl] - Metodo: %rm - URL: %ru - Status HTTP: %Hs - Status squid3: %Ss
#logformat squid3 %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
#logformat squid3mime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
#logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
#logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
cache_mgr webmaster
mail_program mail
cache_effective_user proxy
cache_effective_group proxy
httpd_suppress_version_string off
error_directory /usr/share/squid3/errors/Portuguese/.