Criar cache.log

13. Re: Criar cache.log

Diego Carlos Volpi da Rocha
vvolpi

(usa Ubuntu)

Enviado em 18/06/2012 - 17:47h

error_directory /usr/share/squid3/errors/pt-br



# Porta do Squid
http_port 3128 transparent



# Nome do servidor
visible_hostname uniimagemsquid


# Cache
cache_mem 300 MB
maximum_object_size_in_memory 32 KB
maximum_object_size 1024 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid3 1000 16 256

# Logs de acesso
access_log /var/log/squid3/access.log squid


#coloque seu email
cache_mgr tiuniimagem@gmail.com



# Regras acl padrão
acl manager proto cache_object
acl localhost src 127.0.0.1/32


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 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 CONNECT method CONNECT



# Permissões e bloqueios padrão
http_access allow manager localhost
http_access deny manager
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports


# Bloqueio de sites por URL

acl sites_proibidos url_regex -i "/etc/squid3/regras/sites_proibidos"

http_access deny sites_proibidos



# Bloqueio de downloads por extensão

acl downloads_proibidos url_regex -i \.exe \.torrent \.avi

http_access deny downloads_proibidos


# Permisão rede local e servidor

acl redelocal src 192.168.7.0/32
http_access allow localhost
http_access allow redelocal



# Bloqueio de usuarios fora da rede
http_access deny all
deny_info URL Port SSL_ports



  


14. Re: Criar cache.log

Perfil removido
removido

(usa Nenhuma)

Enviado em 18/06/2012 - 17:56h

Testei seu conf aqui. O problema está nesse cara:

# Bloqueio de usuarios fora da rede
http_access deny all
deny_info URL Port SSL_ports


Comente ele e teste. Depois tu corrige isso!

Depois de comentar e startar rode um tail novamente.

# tail -100 /var/log/squid3/cache.log


15. Re: Criar cache.log

Diego Carlos Volpi da Rocha
vvolpi

(usa Ubuntu)

Enviado em 18/06/2012 - 18:13h

eu retirei essa linha da minha conf
error_directory /usr/share/squid3/errors/pt-br

agora eles esta bloqueando
porem esta bloqueando conteudo que não esta na lista sites_bloqueados




16. Re: Criar cache.log

Perfil removido
removido

(usa Nenhuma)

Enviado em 18/06/2012 - 18:16h

Executa ai.

# tail -100 /var/log/squid3/access.log | grep DENIED


17. Re: Criar cache.log

Diego Carlos Volpi da Rocha
vvolpi

(usa Ubuntu)

Enviado em 18/06/2012 - 18:17h

1340038559.200 0 192.168.7.125 TCP_DENIED/403 3525 CONNECT 192.168.7.129:10000 - NONE/- text/html
1340052522.371 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052542.567 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052542.674 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052582.364 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052642.365 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052656.561 0 192.168.7.125 TCP_DENIED/403 4060 GET http://www.google.com.br/ - NONE/- text/html
1340052656.682 0 192.168.7.125 TCP_DENIED/403 3905 GET http://www.squid-cache.org/Artwork/SN.png - NONE/- text/html
1340052656.880 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340052656.881 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340052681.342 0 192.168.7.125 TCP_DENIED/403 3848 GET http://appexbingweather.trafficmanager.net/WeatherService.svc/LiveTile? - NONE/- text/html
1340052682.061 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052702.363 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052708.680 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052762.367 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052822.362 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052825.277 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052882.366 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340052942.362 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053002.360 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053051.293 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053062.360 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053122.360 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053182.358 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053212.569 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053238.283 0 192.168.7.125 TCP_DENIED/403 4094 GET http://www.google.com.br/ - NONE/- text/html
1340053238.368 0 192.168.7.125 TCP_DENIED/403 3913 GET http://www.squid-cache.org/Artwork/SN.png - NONE/- text/html
1340053238.397 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340053238.407 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340053242.358 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053264.359 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053302.510 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053362.357 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053398.411 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053422.357 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053442.546 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053442.650 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053482.359 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053500.915 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053542.354 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053602.354 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053628.309 0 192.168.7.125 TCP_DENIED/403 3646 GET http://appex-rf.msn.com/cgtile/v1/Sports/Today.xml? - NONE/- text/html
1340053628.323 0 192.168.7.125 TCP_DENIED/403 3730 GET http://appexsports.trafficmanager.net/News.svc/RSSTileNews/PT-BR/20? - NONE/- text/html
1340053628.337 0 192.168.7.125 TCP_DENIED/403 3730 GET http://appexsports.trafficmanager.net/News.svc/RSSTileNews/PT-BR/20? - NONE/- text/html
1340053628.350 0 192.168.7.125 TCP_DENIED/403 3730 GET http://appexsports.trafficmanager.net/News.svc/RSSTileNews/PT-BR/20? - NONE/- text/html
1340053629.502 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053630.711 0 192.168.7.125 TCP_DENIED/403 4639 GET http://rad.msn.com/ADSAdClient31.dll? - NONE/- text/html
1340053662.355 0 192.168.7.125 TCP_DENIED/403 3487 CONNECT login.live.com:443 - NONE/- text/html
1340053719.193 0 192.168.7.125 TCP_DENIED/403 3606 POST http://ssw.live.com/uploaddata.aspx - NONE/- text/html
1340054140.684 0 192.168.7.125 TCP_DENIED/403 4094 GET http://www.google.com.br/ - NONE/- text/html
1340054140.693 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340054140.695 0 192.168.7.125 TCP_DENIED/403 3913 GET http://www.squid-cache.org/Artwork/SN.png - NONE/- text/html
1340054140.710 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340054142.666 0 192.168.7.125 TCP_DENIED/403 4068 GET http://www.google.com.br/ - NONE/- text/html
1340054142.700 0 192.168.7.125 TCP_DENIED/403 3913 GET http://www.squid-cache.org/Artwork/SN.png - NONE/- text/html
1340054142.721 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340054142.721 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340054143.754 0 192.168.7.125 TCP_DENIED/403 4068 GET http://www.google.com.br/ - NONE/- text/html
1340054143.784 0 192.168.7.125 TCP_DENIED/403 3913 GET http://www.squid-cache.org/Artwork/SN.png - NONE/- text/html
1340054143.812 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340054143.812 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340054144.727 0 192.168.7.125 TCP_DENIED/403 4068 GET http://www.google.com.br/ - NONE/- text/html
1340054144.765 0 192.168.7.125 TCP_DENIED/403 3913 GET http://www.squid-cache.org/Artwork/SN.png - NONE/- text/html
1340054144.776 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html
1340054144.776 0 192.168.7.125 TCP_DENIED/403 3652 CONNECT beta.urs.microsoft.com:443 - NONE/- text/html



18. Re: Criar cache.log

Perfil removido
removido

(usa Nenhuma)

Enviado em 18/06/2012 - 18:21h

Nada disso está na lista?


19. Re: Criar cache.log

Diego Carlos Volpi da Rocha
vvolpi

(usa Ubuntu)

Enviado em 18/06/2012 - 18:24h

não
eu coloquei nomes não linck

isso e oq ta la

orkut
facebook
twitter
youtube
sexo
[*****]
tor
torproject
vidalia
ultrasurf
proxy
anonymous
gatewall.dll
ms
messenger
webmessengers
webmessenger
ebuddy
meebo
iloveim
skype
[*****]
sexy
safadinha
speedhide
ninjacloak
dropbox
piratebay
filecrop
baixaki
superdownload


20. Re: Criar cache.log

Perfil removido
removido

(usa Nenhuma)

Enviado em 18/06/2012 - 18:27h

Com url_regex apenas uma palavra já é o suficiente para bloquear.


21. Re: Criar cache.log

Diego Carlos Volpi da Rocha
vvolpi

(usa Ubuntu)

Enviado em 18/06/2012 - 18:35h

pois é

e esta bloqueando site do google coisa que não esta no arquivo


22. Re: Criar cache.log

Perfil removido
removido

(usa Nenhuma)

Enviado em 18/06/2012 - 18:38h

Pessoalmente não gosto do squid controlando conteúdo, ele não foi feito para isso, apesar de bloquear. Eu uso o squid somente como proxy cache. Para controle de conteúdo uso o dansguardian, mas você pode usar também o squidguard. Dá uma lida nisso!

Segue uma dica:
http://www.vivaolinux.com.br/artigo/DansGuardian-versoes-2.9.3.0-e-superiores-em-Debian-5.01/?pagina...


23. Re: Criar cache.log

Diego Carlos Volpi da Rocha
vvolpi

(usa Ubuntu)

Enviado em 19/06/2012 - 09:54h

cara muito obrigado vlw mesmo vc ajudou muito

mas eu achei o erro
era uma coisinha de nda que fiz cagada

na acl de rede local essa
acl redelocal src 192.168.7.0/24


eu estava colocando
acl redelocal src 192.168.7.0/32

e não era puts cara quando descobri que era isso fiquei puto comigo mesmo


mas cara vlw pela ajuda foi de grande valia


24. Re: Criar cache.log

Perfil removido
removido

(usa Nenhuma)

Enviado em 19/06/2012 - 09:58h

vvolpi escreveu:

cara muito obrigado vlw mesmo vc ajudou muito

mas eu achei o erro
era uma coisinha de nda que fiz cagada

na acl de rede local essa
acl redelocal src 192.168.7.0/24


eu estava colocando
acl redelocal src 192.168.7.0/32

e não era puts cara quando descobri que era isso fiquei puto comigo mesmo


mas cara vlw pela ajuda foi de grande valia


uhn... Legal!

Precisando... estamos ai!

Abraço!



01 02