Liberar acesso ao skype no squid

1. Liberar acesso ao skype no squid

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 11/07/2013 - 11:31h

Galera não estou conseguindo fazer o skype funcionar nos usuários que estão no squid

criei uma acl para liberação

acl numeric_IPs dstdom_regex ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9af]+)?:([0-9af:]+)?:([0-9af]+)?\])):443
acl Skype_UA browser ^skype

http_access allow CONNECT localnet numeric_IPS Skype_UA

mas mesmo assim ele não conecta..

alguém pode dar uma força??


  


2. Re: Liberar acesso ao skype no squid

Buckminster
Buckminster

(usa Debian)

Enviado em 11/07/2013 - 15:25h

dsdiego escreveu:

Galera não estou conseguindo fazer o skype funcionar nos usuários que estão no squid

criei uma acl para liberação

acl numeric_IPs dstdom_regex ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9af]+)?:([0-9af:]+)?:([0-9af]+)?\])):443
acl Skype_UA browser ^skype

http_access allow CONNECT localnet numeric_IPS Skype_UA

mas mesmo assim ele não conecta..

alguém pode dar uma força??


acl numeric_IPs dstdom_regex ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9af]+)?:([0-9af:]+)?:([0-9af]+)?\])):443
acl Skype_UA browser ^skype

http_access allow CONNECT localnet numeric_IPS Skype_UA

Você deve colocar essas linhas ANTES das linhas que negam CONNECT, por exemplo:
http_access deny CONNECT !SSL_ports

E deve liberar a porta 443 nas Safe_ports.


3. Re: Liberar acesso ao skype no squid

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 29/07/2013 - 15:59h

Olha como esta meu squid e mesmo assim não funcionou

acl safe_ports port 23390
acl Safe_ports port 1024 #
acl Safe_ports port 443
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

# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access allow manager

# Deny requests to certain unsafe ports
http_access allow !Safe_ports
acl numeric_IPs dstdom_regex ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9af]+)?:([0-9af:]+)?:([0-9af]+)?\])):443
acl Skype_UA browser ^skype
http_access allow CONNECT localnet numeric_IPS Skype_UA
# Deny CONNECT to other than secure SSL ports
#http_access allow CONNECT SSL_ports
http_access deny CONNECT !SSL_ports



4. Re: Liberar acesso ao skype no squid

Buckminster
Buckminster

(usa Debian)

Enviado em 29/07/2013 - 16:12h

dsdiego escreveu:

Olha como esta meu squid e mesmo assim não funcionou

acl safe_ports port 23390
acl Safe_ports port 1024 #
acl Safe_ports port 443
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

# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access allow manager

# Deny requests to certain unsafe ports
http_access allow !Safe_ports
acl numeric_IPs dstdom_regex ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9af]+)?:([0-9af:]+)?:([0-9af]+)?\])):443
acl Skype_UA browser ^skype
http_access allow CONNECT localnet numeric_IPS Skype_UA
# Deny CONNECT to other than secure SSL ports
#http_access allow CONNECT SSL_ports
http_access deny CONNECT !SSL_ports


Esse é todo teu squid.conf?
Você não definiu a ACL da rede local (localnet).
Não definiu se é proxy transparente, além de outras coisas.

E aqui
acl numeric_IPs dstdom_regex ...
acl Skype_UA browser ^skype
http_access allow CONNECT localnet numeric_IPS Skype_UA << veja que o 's' de numeric_IPs deve ser minúsculo.


5. Re: Liberar acesso ao skype no squid

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 29/07/2013 - 16:25h

INICIO

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
visible_hostname coloradoo
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.2.0/24 # 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



aqui esta o resto que são as ACl e Http_access

acl skype src "etc/squid3/acessos/numeric_IPS.txt"
acl admin src "/etc/squid3/acessos/admin.txt"
acl livre dstdomain "/etc/squid3/acessos/sites.txt"
acl liberados src "/etc/squid3/acessos/liberados.txt"
acl almoco time MTWHF 11:30-13:30
acl negados src "/etc/squid3/acessos/corsfab.txt"
acl manutencao src "/etc/squid3/acessos/corsman.txt"
acl temporario dstdomain "/etc/squid3/acessos/almoco.txt"
acl plus dstdomain "/etc/squid3/acessos/plus.txt"
acl man dstdomain "/etc/squid3/acessos/sitesman.txt"
acl xyz dstdomain .xyz.com.br

http_access allow localhost
http_access allow CONNECT localnet numeric_IPS Skype_UA skype
http_access allow admin
http_access allow negados comafal
http_access allow manutencao man
http_access deny manutencao
http_access deny negados
http_access deny liberados plus
http_access allow liberados
http_access allow localnet almoco temporario
http_access allow localnet livre
http_access deny localnet



6. Re: Liberar acesso ao skype no squid

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 30/07/2013 - 10:08h

Agora o squid.conf organizado... Mas ainda não funcionando o skype.. =/

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
visible_hostname coloradoo
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.2.0/24 # 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 safe_ports port 23390
acl Safe_ports port 1024 #
acl Safe_ports port 443
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

# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access allow manager

# Deny requests to certain unsafe ports
http_access allow !Safe_ports
acl numeric_IPs dstdom_regex ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9af]+)?:([0-9af:]+)?:([0-9af]+)?\])):443
acl Skype_UA browser ^skype
http_access allow CONNECT localnet numeric_IPS Skype_UA
# Deny CONNECT to other than secure SSL ports
#http_access allow CONNECT SSL_ports
http_access deny CONNECT !SSL_ports



acl skype src "etc/squid3/acessos/numeric_IPS.txt"
acl admin src "/etc/squid3/acessos/admin.txt"
acl livre dstdomain "/etc/squid3/acessos/sites.txt"
acl liberados src "/etc/squid3/acessos/liberados.txt"
acl almoco time MTWHF 11:30-13:30
acl negados src "/etc/squid3/acessos/corsfab.txt"
acl manutencao src "/etc/squid3/acessos/corsman.txt"
acl temporario dstdomain "/etc/squid3/acessos/almoco.txt"
acl plus dstdomain "/etc/squid3/acessos/plus.txt"
acl man dstdomain "/etc/squid3/acessos/sitesman.txt"
acl xyz dstdomain .xyz.com.br

http_access allow localhost
http_access allow CONNECT localnet numeric_IPS Skype_UA skype
http_access allow admin
http_access allow negados comafal
http_access allow manutencao man
http_access deny manutencao
http_access deny negados
http_access deny liberados plus
http_access allow liberados
http_access allow localnet almoco temporario
http_access allow localnet livre
http_access deny localnet



7. Re: Liberar acesso ao skype no squid

Buckminster
Buckminster

(usa Debian)

Enviado em 03/08/2013 - 15:52h

acl numeric_IPs dstdom_regex ...
acl Skype_UA browser ^skype
http_access allow CONNECT localnet numeric_IPS Skype_UA <<<<<<<<<<<<<<<<<<<<<<<< veja que o 's' de numeric_IPs deve ser minúsculo.

OU SEJA, DEVE FICAR ASSIM ESSA LINHA:

http_access allow CONNECT localnet numeric_IPs Skype_UA


E verifique se no firewall a porta 443 não está bloqueada.

E coloque a seguinte linha no squid.conf:

http_port 3128 transparent <<< se o Squid for versão até 3.0


http_port 3128 intercept <<< se o Squid for versão 3.1 ou acima.

coloque uma das linhas acima por primeiro, antes da linha

acl manager proto cache_object

Para ver a versão do teu Squid execute squid -v.

E essa linha abaixo
http_access allow manager

deixe ela assim:
http_access deny manager


8. Re: Liberar acesso ao skype no squid

Roberto Costa
asparion

(usa Ubuntu)

Enviado em 03/08/2013 - 18:04h

Boa Noite...




so uma pergunta?

voce tem essa linha de comando no seu iptables?

iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE 


voce pode verificar usando a linha de comando

iptables -t nat -nvL POSTROUTING 


se nao tiver pode adicionar que garanto que vai funcionar..

olha eu uso essa forma bem simples para controlar o uso do skype

adicionei as linhas nao meu squid

#Para bloqueio Geral
# ACL PARA BLOQUEIO DO SKYPE POR IP DE USUARIO
acl numeric_IPs url_regex ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
http_access deny CONNECT numeric_IPs all

#Para bloqueio por IP
# ACL para ter alguns IPs que podem se conectar ao Skype
acl skype_users src "/etc/squid/liberado_skype"
acl skype_url url_regex ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+

http_access allow CONNECT skype_users skype_url
http_access deny CONNECT skype_url


ai e so voce criar o arquivo liberado_skype e colocar os ips la, ips adicionado la irao acessar o skype os que nao tiver nao

vim /etc/squid/liberado_skype 



faz um teste ai abraços.....


9. Re: Liberar acesso ao skype no squid

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 05/08/2013 - 15:24h

Buckminster escreveu:

acl numeric_IPs dstdom_regex ...
acl Skype_UA browser ^skype
http_access allow CONNECT localnet numeric_IPS Skype_UA <<<<<<<<<<<<<<<<<<<<<<<< veja que o 's' de numeric_IPs deve ser minúsculo.

OU SEJA, DEVE FICAR ASSIM ESSA LINHA:

http_access allow CONNECT localnet numeric_IPs Skype_UA


E verifique se no firewall a porta 443 não está bloqueada.

E coloque a seguinte linha no squid.conf:

http_port 3128 transparent <<< se o Squid for versão até 3.0


http_port 3128 intercept <<< se o Squid for versão 3.1 ou acima.

coloque uma das linhas acima por primeiro, antes da linha

acl manager proto cache_object

Para ver a versão do teu Squid execute squid -v.

E essa linha abaixo
http_access allow manager

deixe ela assim:
http_access deny manager



Configurei exatamente como você me disse...mas ainda não esta conectando...
O meu squid tem acesso de admin junto ao firewall então realmente é o squid que esta bloqueando o acesso
segue o log que observei

1375724994.910 27 192.168.1.173 TCP_DENIED/403 3779 GET http://www.globo.com/ - NONE/- text/html
1375724995.199 0 192.168.1.173 TCP_DENIED/403 3857 GET http://www.squid-cache.org/Artwork/SN.png - NONE/- text/html
1375724995.240 0 192.168.1.173 TCP_DENIED/403 3812 GET http://www.globo.com/favicon.ico - NONE/- text/html
1375725026.070 1869 192.168.1.173 TCP_DENIED/403 3438 CONNECT 213.199.179.151:443 - NONE/- text/html
1375725027.845 1622 192.168.1.173 TCP_DENIED/403 3436 CONNECT 111.221.77.150:443 - NONE/- text/html
1375725027.847 2635 192.168.1.173 TCP_DENIED/403 3434 CONNECT 111.221.74.25:443 - NONE/- text/html
1375725028.417 1192 192.168.1.173 TCP_DENIED/403 3436 CONNECT 157.55.235.143:443 - NONE/- text/html
1375725029.632 1386 192.168.1.173 TCP_DENIED/403 3430 CONNECT 64.4.23.150:443 - NONE/- text/html
1375725030.474 1227 192.168.1.173 TCP_DENIED/403 3432 CONNECT 65.55.223.34:443 - NONE/- text/html
1375725031.224 2 192.168.1.173 TCP_DENIED/403 3436 CONNECT 111.221.77.151:443 - NONE/- text/html
1375725032.245 2 192.168.1.173 TCP_DENIED/403 3436 CONNECT 157.55.235.156:443 - NONE/- text/html
1375725126.632 3 192.168.1.173 TCP_DENIED/403 3434 CONNECT 157.55.56.166:443 - NONE/- text/html
1375725127.643 2 192.168.1.173 TCP_DENIED/403 3438 CONNECT 213.199.179.142:443 - NONE/- text/html
1375725128.659 6 192.168.1.173 TCP_DENIED/403 3434 CONNECT 157.55.56.146:443 - NONE/- text/html
1375725129.663 0 192.168.1.173 TCP_DENIED/403 3436 CONNECT 157.55.235.156:443 - NONE/- text/html
1375725130.669 5 192.168.1.173 TCP_DENIED/403 3432 CONNECT 65.55.223.16:443 - NONE/- text/html
1375725132.638 0 192.168.1.173 TCP_DENIED/403 3438 CONNECT 213.199.179.151:443 - NONE/- text/html
1375725133.697 8 192.168.1.173 TCP_DENIED/403 3434 CONNECT 111.221.74.19:443 - NONE/- text/html
1375725134.713 4 192.168.1.173 TCP_DENIED/403 3434 CONNECT 111.221.74.37:443 - NONE/- text/html





10. Re: Liberar acesso ao skype no squid

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 19/08/2013 - 16:46h

dsdiego escreveu:

Buckminster escreveu:

acl numeric_IPs dstdom_regex ...
acl Skype_UA browser ^skype
http_access allow CONNECT localnet numeric_IPS Skype_UA <<<<<<<<<<<<<<<<<<<<<<<< veja que o 's' de numeric_IPs deve ser minúsculo.

OU SEJA, DEVE FICAR ASSIM ESSA LINHA:

http_access allow CONNECT localnet numeric_IPs Skype_UA


E verifique se no firewall a porta 443 não está bloqueada.

E coloque a seguinte linha no squid.conf:

http_port 3128 transparent <<< se o Squid for versão até 3.0


http_port 3128 intercept <<< se o Squid for versão 3.1 ou acima.

coloque uma das linhas acima por primeiro, antes da linha

acl manager proto cache_object

Para ver a versão do teu Squid execute squid -v.

E essa linha abaixo
http_access allow manager

deixe ela assim:
http_access deny manager



Configurei exatamente como você me disse...mas ainda não esta conectando...
O meu squid tem acesso de admin junto ao firewall então realmente é o squid que esta bloqueando o acesso
segue o log que observei

1375724994.910 27 192.168.1.173 TCP_DENIED/403 3779 GET http://www.globo.com/ - NONE/- text/html
1375724995.199 0 192.168.1.173 TCP_DENIED/403 3857 GET http://www.squid-cache.org/Artwork/SN.png - NONE/- text/html
1375724995.240 0 192.168.1.173 TCP_DENIED/403 3812 GET http://www.globo.com/favicon.ico - NONE/- text/html
1375725026.070 1869 192.168.1.173 TCP_DENIED/403 3438 CONNECT 213.199.179.151:443 - NONE/- text/html
1375725027.845 1622 192.168.1.173 TCP_DENIED/403 3436 CONNECT 111.221.77.150:443 - NONE/- text/html
1375725027.847 2635 192.168.1.173 TCP_DENIED/403 3434 CONNECT 111.221.74.25:443 - NONE/- text/html
1375725028.417 1192 192.168.1.173 TCP_DENIED/403 3436 CONNECT 157.55.235.143:443 - NONE/- text/html
1375725029.632 1386 192.168.1.173 TCP_DENIED/403 3430 CONNECT 64.4.23.150:443 - NONE/- text/html
1375725030.474 1227 192.168.1.173 TCP_DENIED/403 3432 CONNECT 65.55.223.34:443 - NONE/- text/html
1375725031.224 2 192.168.1.173 TCP_DENIED/403 3436 CONNECT 111.221.77.151:443 - NONE/- text/html
1375725032.245 2 192.168.1.173 TCP_DENIED/403 3436 CONNECT 157.55.235.156:443 - NONE/- text/html
1375725126.632 3 192.168.1.173 TCP_DENIED/403 3434 CONNECT 157.55.56.166:443 - NONE/- text/html
1375725127.643 2 192.168.1.173 TCP_DENIED/403 3438 CONNECT 213.199.179.142:443 - NONE/- text/html
1375725128.659 6 192.168.1.173 TCP_DENIED/403 3434 CONNECT 157.55.56.146:443 - NONE/- text/html
1375725129.663 0 192.168.1.173 TCP_DENIED/403 3436 CONNECT 157.55.235.156:443 - NONE/- text/html
1375725130.669 5 192.168.1.173 TCP_DENIED/403 3432 CONNECT 65.55.223.16:443 - NONE/- text/html
1375725132.638 0 192.168.1.173 TCP_DENIED/403 3438 CONNECT 213.199.179.151:443 - NONE/- text/html
1375725133.697 8 192.168.1.173 TCP_DENIED/403 3434 CONNECT 111.221.74.19:443 - NONE/- text/html
1375725134.713 4 192.168.1.173 TCP_DENIED/403 3434 CONNECT 111.221.74.37:443 - NONE/- text/html






O detalhe é que o meu squid esta barrando os IPs para conexão ao skype..como vc pode ver acima está negando tudo