Squid vs Exchange [RESOLVIDO]

1. Squid vs Exchange [RESOLVIDO]

Kiko Silva
tempraxx

(usa Debian)

Enviado em 06/07/2012 - 00:14h

Boa noite pessoal,
Estou passando por um problema bem estranho, criei um server Debian amd64, com um squid com autenticação no AD.
A autenticação e liberação por grupo funciona, os bloqueios funcionam, porem existe um problema.

Os outlooks da minha rede são Exchange e logo depois de alguns segundos ele pede usuario e senha.

Se eu retiro o proxy que não é transparente ele funciona, porem se eu setar i proxy nas configurações de internet ele pede senha.

No access.log eu recebo a msg de tcp/ip denied - webmail.meudominio.com.br:443

Segue meu squid.conf caso alguem consiga me ajudar.

################ Squid ######################

### Arquivo de Configuracao do Squid

######## Tags Comuns ###################################

cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_mem 1024 Mb
cache_swap_log /var/spool/squid/swap.log
cache_dir diskd /var/spool/squid 1024 16 256

#######################################################

####### Porta de acesso a internet ####################

http_port 3128

########## Nome do host ################################

visible_hostname tempra.xxxxx.com.br

########################################################

########### ACL que identifica toda a rede #############

acl all src 0.0.0.0/0.0.0.0
acl rede src 162.16.1.0/32

################# Libera Msn ###########################

acl msncontatos dstdomain contacts.msn.com
acl msncontatos2 urlpath_regex contacts.msn.com
acl msn urlpath_regex -i gateway.dll
acl msnd dstdomain messenger.msn.com gateway.messenger.hotmail.com byrdr.omega.contacts.msn.com contacts.msn.com local-bay.contacts.msn.com by2.storage.msn.com
acl msn1 req_mime_type application/X-msn-messenger

http_access allow msnd
http_access allow msncontatos
http_access allow msncontatos2
http_access allow msn
http_access allow msn1

############ Modulos de autenticacao #################

auth_param basic program /usr/lib/squid/ldap_auth -R -b "dc=seudominio,dc=com,dc=br" -D "cn=Administrator,cn=Users,dc=seudominio,dc=com,dc=br" -w "****" -f sAMAccountName=%s -h xxx.xxx.xxx.xxx

################## Reconhecimento de Grupos #################

external_acl_type ldap_group %LOGIN /usr/lib/squid/wbinfo_group.pl

############### Exige autcacao para navegar ##########

acl autentica proxy_auth REQUIRED

############## Libecao por Grupo ###################

acl mkt external ldap_group MKT
acl full external ldap_group FULL

#########################################################

##### Grupo de ips liberados ############################
acl liberados src "/etc/squid/liberados"
acl macs_liberados arp "/etc/squid/macs_liberados"
http_access allow liberados
http_access allow macs_liberados
http_access allow full
##########################################################

######## Zona de Seguranca improprios ######################
acl improprios url_regex -i "/etc/squid/improprio"
#acl [*****] url_regex -i "/etc/squid/[*****]"
http_access deny improprios
###########################################################

#### Bloqueio de Paginas Internet e liberando almoço #######
acl almoco time 11:00-14:00
acl tarde time 18:00-23:59
acl madrugada time 00:00-07:30
acl blockedsites url_regex -i "/etc/squid/palavras_bloqueadas"
http_access deny blockedsites !almoco !tarde !madrugada !mkt
###########################################################

######## Zona de Seguranca Download ######################
acl download urlpath_regex "/etc/squid/download_deny"
http_access deny download !almoco !tarde !madrugada
###########################################################

######### Zona de Seguranca Bloqueio de MAC ###############
acl macs_bloqueados arp "/etc/squid/macs_bloqueados"
http_access deny macs_bloqueados
###########################################################

####### Zona de Seguranca No Cache ########################
acl NOCACHE url_regex "/etc/squid/nocache" \?
no_cache deny NOCACHE
###########################################################

################ Protecao de Portas #######################
acl manager proto cache_object
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_ports port 25
acl Safe_ports port 110
acl Safe_ports port 70 # gopher
acl Safe_ports port 21
acl Safe_ports port 443 563 # snews
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535 # unregistred ports
acl Safe_ports port 280
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager rede
http_access allow rede
http_access allow autentica
http_access allow Safe_ports
http_access allow SSL_ports
http_access allow all
################################################################

########### Bloquear todo o resto ##############################
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny manager
http_access deny all
icp_access deny all
###############################################################

Apenas saliento que isso é parte importante de um projeto da empresa.

Aguardo.





  


2. Re: Squid vs Exchange [RESOLVIDO]

Kiko Silva
tempraxx

(usa Debian)

Enviado em 11/07/2012 - 17:08h

tempraxx escreveu:

Boa noite pessoal,
Estou passando por um problema bem estranho, criei um server Debian amd64, com um squid com autenticação no AD.
A autenticação e liberação por grupo funciona, os bloqueios funcionam, porem existe um problema.

Os outlooks da minha rede são Exchange e logo depois de alguns segundos ele pede usuario e senha.

Se eu retiro o proxy que não é transparente ele funciona, porem se eu setar i proxy nas configurações de internet ele pede senha.

No access.log eu recebo a msg de tcp/ip denied - webmail.meudominio.com.br:443

Segue meu squid.conf caso alguem consiga me ajudar.

################ Squid ######################

### Arquivo de Configuracao do Squid

######## Tags Comuns ###################################

cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_mem 1024 Mb
cache_swap_log /var/spool/squid/swap.log
cache_dir diskd /var/spool/squid 1024 16 256

#######################################################

####### Porta de acesso a internet ####################

http_port 3128

########## Nome do host ################################

visible_hostname tempra.xxxxx.com.br

########################################################

########### ACL que identifica toda a rede #############

acl all src 0.0.0.0/0.0.0.0
acl rede src 162.16.1.0/32

################# Libera Msn ###########################

acl msncontatos dstdomain contacts.msn.com
acl msncontatos2 urlpath_regex contacts.msn.com
acl msn urlpath_regex -i gateway.dll
acl msnd dstdomain messenger.msn.com gateway.messenger.hotmail.com byrdr.omega.contacts.msn.com contacts.msn.com local-bay.contacts.msn.com by2.storage.msn.com
acl msn1 req_mime_type application/X-msn-messenger

http_access allow msnd
http_access allow msncontatos
http_access allow msncontatos2
http_access allow msn
http_access allow msn1

############ Modulos de autenticacao #################

auth_param basic program /usr/lib/squid/ldap_auth -R -b "dc=seudominio,dc=com,dc=br" -D "cn=Administrator,cn=Users,dc=seudominio,dc=com,dc=br" -w "****" -f sAMAccountName=%s -h xxx.xxx.xxx.xxx

################## Reconhecimento de Grupos #################

external_acl_type ldap_group %LOGIN /usr/lib/squid/wbinfo_group.pl

############### Exige autcacao para navegar ##########

acl autentica proxy_auth REQUIRED

############## Libecao por Grupo ###################

acl mkt external ldap_group MKT
acl full external ldap_group FULL

#########################################################

##### Grupo de ips liberados ############################
acl liberados src "/etc/squid/liberados"
acl macs_liberados arp "/etc/squid/macs_liberados"
http_access allow liberados
http_access allow macs_liberados
http_access allow full
##########################################################

######## Zona de Seguranca improprios ######################
acl improprios url_regex -i "/etc/squid/improprio"
#acl [*****] url_regex -i "/etc/squid/[*****]"
http_access deny improprios
###########################################################

#### Bloqueio de Paginas Internet e liberando almoço #######
acl almoco time 11:00-14:00
acl tarde time 18:00-23:59
acl madrugada time 00:00-07:30
acl blockedsites url_regex -i "/etc/squid/palavras_bloqueadas"
http_access deny blockedsites !almoco !tarde !madrugada !mkt
###########################################################

######## Zona de Seguranca Download ######################
acl download urlpath_regex "/etc/squid/download_deny"
http_access deny download !almoco !tarde !madrugada
###########################################################

######### Zona de Seguranca Bloqueio de MAC ###############
acl macs_bloqueados arp "/etc/squid/macs_bloqueados"
http_access deny macs_bloqueados
###########################################################

####### Zona de Seguranca No Cache ########################
acl NOCACHE url_regex "/etc/squid/nocache" \?
no_cache deny NOCACHE
###########################################################

################ Protecao de Portas #######################
acl manager proto cache_object
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_ports port 25
acl Safe_ports port 110
acl Safe_ports port 70 # gopher
acl Safe_ports port 21
acl Safe_ports port 443 563 # snews
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535 # unregistred ports
acl Safe_ports port 280
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager rede
http_access allow rede
http_access allow autentica
http_access allow Safe_ports
http_access allow SSL_ports
http_access allow all
################################################################

########### Bloquear todo o resto ##############################
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny manager
http_access deny all
icp_access deny all
###############################################################

Apenas saliento que isso é parte importante de um projeto da empresa.

Aguardo.





Ninguem nunca passou por isso???



3. Re: Squid vs Exchange [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 11/07/2012 - 17:16h

Já tentou cria uma acl de domínios liberados, adicionando seu domínio interno, e setar o mesmo para não utilizar proxy?



4. Re: Squid vs Exchange [RESOLVIDO]

Kiko Silva
tempraxx

(usa Debian)

Enviado em 11/07/2012 - 17:28h

amarildosertorio

Obrigado pela resposta, mais como vou fazer para liberar este dominio que tem uma porta especifica com ACL??


5. Re: Squid vs Exchange [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 11/07/2012 - 17:43h

tempraxx escreveu:

amarildosertorio

Obrigado pela resposta, mais como vou fazer para liberar este dominio que tem uma porta especifica com ACL??


Bem... Você postou que sem proxy ele funciona. Correto?
A principio basta você criar uma acl para domínios sem proxy.

Ex:

# vi /etc/squid3/squid.conf
# Domínios seguros/sem autenticação
acl dominiosLiberados dstdomain -i "/etc/squid3/dominiosLiberados"
http_access allow dominiosLiberados


# vi /etc/squid3/dominiosLiberados
# DOMÍNIO INTERNO
.meudominio.com.br


# squid3 -k reconfigure

Beleza! Agora é só configurar para não usar proxy para esse domínio. O outlook usa a configuração de proxy do sistema não é?

Vai em:
- Propriedade do IE;
- Conexões;
- Configurações da LAM;
- Avançados
- Exceções ==> Não usar proxy para endereços iniciados por:
www.meudominio.com.br, meudominio.com.br 





6. Re: Squid vs Exchange [RESOLVIDO]

Kiko Silva
tempraxx

(usa Debian)

Enviado em 12/07/2012 - 18:57h

amarildosertorio

Obrigado pela ajuda, resolveu meu problema


7. Re: Squid vs Exchange [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 12/07/2012 - 21:49h

Por nada!

Precisando... estamos ai!






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts