Liberando o Windows Live Messenger 2009 no Squid (completo)

Publicado por Fernando Cesar Vaini em 19/11/2009

[ Hits: 18.278 ]

 


Liberando o Windows Live Messenger 2009 no Squid (completo)



Já vi várias dicas, artigos e perguntas sobre a liberação do WLM no Squid autenticado. Porém aplicando o que li, descobri que a liberação não ocorre completamente. Por exemplo, aqueles banners do MSN, também chamado de Advertisement (não sei como, mas alguns usuários ainda gostam daquilo), aquelas informações sobre os seus contatos, aqueles pequenos popups que aparecem no canto inferior da tela, avisando que você tem uma nova mensagem, entre outros não aparecem, ou seja, continuam bloqueados.

Depois de gastar algumas horas de Google e vários testes no Squid, consegui fazer essa liberação. Para que tudo funcionasse sem interferir no funcionamento dos demais usuários, criei um usuário MSN e configurei no WLM o usuário MSN.

No squid.conf, inclua as seguintes ACLs:

acl MsnSources url_regex -i "/etc/squid/sites.msn"
acl MsnDomains dstdomain -i "/etc/squid/sites.msn"
acl MsnUrls urlpath_regex -i "/etc/squid/sites.msn"
acl MsnProgram req_mime_type application/X-msn-messenger
acl MsnManual dstdomain byrdr.omega.contacts.msn.com local-bay.contacts.msn.com byfiles.storage.msn.com akhtm.nspmotion.com blufiles.storage.msn.com www.gowindowslive.com view.atdmt.com local-sn.contacts.msn.com ec.atdmt.com tkrdr.storage.msn.com livefiles19.vo.msecnd.net www.sqm.microsoft.com sqmserver.dll switch.atdmt.com rsi.hotmail.com nspmotion.com icover.com.br rad.msn.com rmd.atdmt.com t.msn.com
acl MSNUser proxy_auth msn

Depois de fazer a liberação das ACLs padrão manage, purge, safe_ports etc, fiz imediatamente a liberação do MSN como abaixo.

http_access allow MsnManual
http_access deny MSNUser !MsnSources !MsnDomains !MsnUrls !MsnProgram

*** Note que essas regras devem ser as primeiras ***

Abaixo segue o conteúdo do arquivo sites.msn, que contém os diversos endereços acessados pelo MSN:

207.46.107.19
207.46.108.51
207.46.109.107
207.46.110.11
207.46.111.54
207.46.113.220
ads1.msn.com
ADSAdClient31.dll
akhtm.nspmotion.com
blufiles.storage.msn.com
blst.msn.com
.byrdr.omega.contacts.msn.com/*
by1.omega.contacts.msn.com
by2.omega.contacts.msn.com
by3.omega.contacts.msn.com
by4.omega.contacts.msn.com
by5.omega.contacts.msn.com
.byfiles.storage.msn.com/*
c.msn.com
chat.msn.com
chat.msn.com.br
col.stb.s-msn.com
col.stc.s-msn.com
col.stj.s-msn.com
config.messenger.msn.com
contacts.msn.com
crl.microsoft.com
ec.atdmt.com
filter.msn.com
g.live.com
g.msn.com
gateway.dll
gateway.messenger.hotmail.com
gatway.dll
gowindowslive.com
h.msn.com
help.live.com
home.live.com
hotmail.com
hotmail.msn.com
hp.msn.com
hpc.msn.com
http1.msgr.hotmail.com
http10.msgr.hotmail.com
http11.msgr.hotmail.com
http12.msgr.hotmail.com
http13.msgr.hotmail.com
http14.msgr.hotmail.com
http15.msgr.hotmail.com
http16.msgr.hotmail.com
http17.msgr.hotmail.com
http18.msgr.hotmail.com
http19.msgr.hotmail.com
http2.msgr.hotmail.com
http20.msgr.hotmail.com
http3.msgr.hotmail.com
http4.msgr.hotmail.com
http5.msgr.hotmail.com
http6.msgr.hotmail.com
http7.msgr.hotmail.com
http8.msgr.hotmail.com
http9.msgr.hotmail.com
ibypass.com
icover.com.br
.img.wlxrs.com
join.msn.com
livefiles19.vo.msecnd.net
local-bay.contacts.msn.com
local-sn.contacts.msn.com
login.live.com
login.live.com:443
loginnet.passport.com:443
mail.live.com
messenger
messenger.msn.com
messenger.msn.com.br
msgr.hotmail.com
msn.be
msn.br
msn.com
msn.com.br
msn.messenger.com
msn_messenger
mymsn.hotmail.com
mymsn.hotmail.msn.com
nickname.msn.com.br
nspmotion.com
omega.contacts.msn.com:443
p.live.com
passport.com
rad.msn.com
relay.data.edge.messenger.live.com:443
rmd.atdmt.com
rsi.hotmail.com
sc.msn.com
spaces.live.com
.sqm.microsoft.com/*
sqmserver.dll
st.msn.com
stb.msn.com
stc.msn.com
stj.msn.com
storage.msn.com
sup.live.com
switch.atdmt.com
t.msn.com
tkrdr.storage.msn.com
tp.msn.com
.view.atdmt.com/*
www.gowindowslive.com

Espero que seja útil para alguém.

Outras dicas deste autor

Resolvendo problemas de autenticação do smb_auth lendo proxyauth

Executar comandos ou scripts no Linux via Windows, sem intervenção do usuário

Leitura recomendada

Yahoo Mail Checker - Notificador de email do Yahoo para o Firefox

Doode - Sua rede Linux de amigos de casa nova

Compartilhamento de internet

Placas Wireless no GNU/Linux - Instalando corretamente

Instalando Modem 3G no Ubuntu 12.10 e Linux Mint 14

  

Comentários
[1] Comentário enviado por magnolinux em 19/11/2009 - 17:37h

Otima dica...

Eu já venho a muito tempo fazendo o bloqueio/liberação do msn pelo layer7, e nunca tive problemas... Sempre funcionou 100%..

O problema de bloquear/liberar os dominios , é que ao passar do tempo vai existir mais e mais e mais e mais.....

na migração do msn 8 para o 8.5, simplesmente minhas regras de squid nao funcionavam mais... Devido a um grande numero de dominios terem sido criados para autenticar a nova versão do msn...

Um abraço;.


[2] Comentário enviado por Bruno Soares em 30/11/2009 - 08:25h

Fernando .. Cara ajudo muito... eu estava com problema a um bom tempo já com o MSN uma hora entrava outra não, com a ultima atualização (11/2009)não entrava de jeito nenhum...
isso resolveu de cara. o erro que ocorria comigo era que não podia carregar a lista de contatos... 100 % resolvido

Parabéns cara valew abraço XD

[3] Comentário enviado por viniciussouza em 05/01/2010 - 15:12h

muito bom amigo mas o meu aque não deu certo. ainda continua. o mesmo erro. segue meu squid.conf squid 2.6 stable20

################################################
##### Porta, Nome e Cache #####
################################################
#
http_port 3128
visible_hostname xxxxxxxxxxxxxxxx
cache_mem 64 MB
maximum_object_size_in_memory 64 KB
half_closed_clients off
maximum_object_size 1024 MB
minimum_object_size 0 KB
cache_swap_low 80
cache_swap_high 100
cache_dir ufs /var/squid/cache/1 2900 128 256
cache_dir ufs /var/squid/cache/2 2900 128 256
cache_dir ufs /var/squid/cache/3 2900 128 256
cache_dir ufs /var/squid/cache/4 2900 128 256
cache_dir ufs /var/squid/cache/5 2900 128 256
cache_access_log /var/log/squid/access.log
cache_store_log /var/log/squid/store.log
cache_log /var/log/squid/cache.log
cache_access_log /var/log/squid/access.log
cache_dir ufs /var/spool/squid 20000 16 256
refresh_pattern ^ftp: 1440 20% 20080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
#
################################################
##### ACLs #####
################################################
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
#acl SSL_ports port port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
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 Safe_ports port 901 # swat
acl Safe_ports port 1025-65535 # portas altas
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
#
################################################
## USANDO NCSA_AUTH ##
################################################
#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param basic realm Prefeitura Municipal de Campina Verde
#auth_param basic children 5
#
################################################
## AUTENTICAÇÃO ## #
acl autenticados proxy_auth REQUIRED
################################################
#
################################################
## Liberando Windows Live ##
################################################
acl MsnSources url_regex -i "/etc/squid/site_msn.txt"
acl MsnDomains dstdomain -i "/etc/squid/site_msn.txt"
acl MsnUrls urlpath_regex -i "/etc/squid/site_msn.txt"
acl MsnProgram req_mime_type application/X-msn-messenger
acl MsnManual dstdomain byrdr.omega.contacts.msn.com local-bay.contacts.msn.com byfiles.storage.msn.com akhtm.nspmotion.com blufiles.storage.msn.com www.gowindowslive.com view.atdmt.com local-sn.contacts.msn.com ec.atdmt.com tkrdr.storage.msn.com livefiles19.vo.msecnd.net www.sqm.microsoft.com sqmserver.dll switch.atdmt.com rsi.hotmail.com nspmotion.com icover.com.br rad.msn.com rmd.atdmt.com t.msn.com
acl MSNUser proxy_auth msn
http_access allow MsnManual
http_access deny MSNUser !MsnSources !MsnDomains !MsnUrls !MsnProgram
###############################################
## Acesso liberado ##
###############################################
acl site_liberado url_regex -i "/etc/squid/site_liberado.txt"
http_access allow site_liberado
#
################################################
## Bloqueio de Download por extenções ##
################################################
acl download url_regex -i "/etc/squid/download.txt"
http_access deny download
#
################################################
## Bloqueio de Sites e liberados ##
################################################
#
acl bloqueio_palavras url_regex -i "/etc/squid/bloqueio_palavras.txt"
acl sites_nocivos url_regex -i "/etc/squid/sites_nocivos.txt"
http_access deny sites_nocivos
http_access deny bloqueio_palavras
#
################################################
## BLOQUEIA ORKUT ##
################################################
#
acl bloqueio_orkut url_regex -i "/etc/squid/bloqueio_orkut.txt"
http_access deny bloqueio_orkut
#
################################################
## BLOQUEIA GOOGLE TALK ##
################################################
#
acl bloqueio_googletalk url_regex -i "/etc/squid/bloqueio_googletalk.txt"
http_access deny bloqueio_googletalk
#
http_access allow autenticados !bloqueio_orkut !bloqueio_palavras !sites_nocivos
http_access deny bloqueio_palavras bloqueio_orkut sites_nocivos
#
################################################
# Radios e Conteudo Streaming ##
################################################
acl streaming rep_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$ # \.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
###############################################
## Bloqueios de conteudo radias e video ##
###############################################
acl streaming rep_mime_type -i "/etc/squid/mimeaplicativo.txt"
acl proibir_musica urlpath_regex -i "/etc/squid/audioextension.txt"

###############################################
## RADIOS E VIDEOS ##
###############################################
acl StreamingRequest1 req_mime_type -i ^video/x-ms-asf$
acl StreamingRequest2 req_mime_type -i ^application/vnd.ms.wms-hdr.asfv1$
acl StreamingRequest3 req_mime_type -i ^application/x-mms-framed$
acl StreamingRequest4 req_mime_type -i ^audio/x-pn-realaudio$
acl StreamingReply1 rep_mime_type -i ^video/x-ms-asf$
acl StreamingReply2 rep_mime_type -i ^application/vnd.ms.wms-hdr.asfv1$
acl StreamingReply3 rep_mime_type -i ^application/x-mms-framed$
acl StreamingReply4 rep_mime_type -i ^audio/x-pn-realaudio$
################## RADIO VIDEO ###########################
http_access deny StreamingRequest1 all
http_access deny StreamingRequest2 all
http_access deny StreamingRequest3 all
http_access deny StreamingRequest4 all

http_reply_access deny StreamingReply1 all
http_reply_access deny StreamingReply2 all
http_reply_access deny StreamingReply3 all
http_reply_access deny StreamingReply4 all
################################################
#
acl redelocal src 192.168.0.0/255.255.255.0
http_access allow localhost
#
http_access deny all
memory_replacement_policy heap LRU
cache_mgr xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
request_body_max_size 900 KB
cache_effective_user squid
cache_effective_group squid
error_directory /usr/share/squid/errors/Portuguese
cache deny streaming StreamingRequest1 StreamingRequest2 StreamingRequest3 StreamingRequest4 StreamingReply1 StreamingReply2 StreamingReply3 StreamingReply4 redelocal



Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts