[CentOS-pt-br] Limitar tamanho downloado squid.

Leonardo Bacha Abrantes leonardo em lbasolutions.com
Sábado Julho 7 19:04:06 EDT 2012


Oi Leomar,,

meu squid.conf está abaixo. cheguei a modificar algumas coisas, mas não
funcionou.


http_port 3128
cache_effective_user squid
cache_effective_group squid
forwarded_for off
visible_hostname srv-proxy
auth_param ntlm program /usr/bin/ntlm_auth
--helper-protocol=squid-2.5-ntlmssp --domain=meudominio
auth_param ntlm children 60
auth_param basic program /usr/bin/ntlm_auth
--helper-protocol=squid-2.5-ntlmssp --domain=meudominio
auth_param basic children       20
auth_param basic realm Por favor digite seu usuario e senha de rede
auth_param basic credentialsttl 8 hours
authenticate_ttl 1 hour

cache_mem 4 GB
cache_dir ufs /var/spool/squid 1024 16 256
coredump_dir /var/spool/squid

maximum_object_size_in_memory 2 MB
maximum_object_size 512 MB
minimum_object_size 0 KB

acl all src all
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
acl localnet src 10.10.1.0/25


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
logformat combined [%tl] %un %>a "%rm %Ss/>Hs "%ru" %mt
access_log /var/log/squid/access.log combined
cache_store_log /var/log/squid/store.log
cache_swap_log /var/log/squid/swap.log
acl DEFAULT_ACCESS proxy_auth -i "/etc/squid/default_access.acl"
acl Download_upTo_10MB proxy_auth "/etc/squid/allow_download_upTo_10MB.acl"
acl Download_upTo_50MB proxy_auth "/etc/squid/allow_download_upTo_50MB.acl"
acl Download_upTo_100MB proxy_auth
"/etc/squid/allow_download_upTo_100MB.acl"
acl Unlimited_Download proxy_auth "/etc/squid/allow_download_unlimited.acl"
acl DEFAULT_ACCESS  proxy_auth "/etc/squid/default_access.acl"
request_header_access    All    allow    all
reply_body_max_size 0 Unlimited_Download localhost
reply_body_max_size 5 MB DEFAULT_ACCESS
reply_body_max_size 10 MB Download_upTo_10MB
reply_body_max_size 50 MB Download_upTo_50MB
reply_body_max_size 100 MB Download_upTo_100MB
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
redirect_program /etc/squidGuard/bin/squidGuard -c
/usr/local/squidGuard/squidGuard.conf
redirect_children 10
http_access allow DEFAULT_ACCESS
cache_swap_low 90
cache_swap_high 95
http_access allow localnet
http_access allow localhost
acl LocalDomains dstdomain *.meudominio*.com.br
no_cache deny LocalDomains
http_access deny all
hierarchy_stoplist cgi-bin ?
dns_nameservers 10.10.1.45
refresh_pattern ^ftp:        1440    20%    10080
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern -i (/cgi-bin/|\?) 0    0%    0
refresh_pattern .        0    20%    4320


abs,


2012/7/7 Leomar Viegas Junior <leomar.viegas em gmail.com>

> Olá Leonardo,
>
> Coloque estas configurações de limite de arquivo antes da autenticação.
>
> Abs.
>
> Leomar.
> On Jul 6, 2012 1:39 PM, "Leonardo Bacha Abrantes" <
> leonardo em lbasolutions.com> wrote:
>
>> Boa tarde pessoal,
>>
>> Estou instalando um squid que está autenticando os usuários no AD e
>> funcionando legal, porém, quando insiro as regras(abaixo) para limitar o
>> tamanho de download, fico recebendo um prompt solicitando usuário e senha.
>>
>> acl Download_upTo_10MB proxy_auth
>> "/etc/squid/allow_download_upTo_10MB.acl"
>> acl Download_upTo_50MB proxy_auth
>> "/etc/squid/allow_download_upTo_50MB.acl"
>> acl Download_upTo_100MB proxy_auth
>> "/etc/squid/allow_download_upTo_100MB.acl"
>> acl Unlimited_Download proxy_auth
>> "/etc/squid/allow_download_unlimited.acl"
>>
>> reply_body_max_size 0 Unlimited_Download
>> reply_body_max_size 5 MB DEFAULT_ACCESS
>> reply_body_max_size 10 MB Download_upTo_10MB
>> reply_body_max_size 50 MB Download_upTo_50MB
>> reply_body_max_size 100 MB Download_upTo_100MB
>>
>>
>> alguém pode me dar um help por favor ?
>>
>> obrigado!
>> []'s
>>
>> _______________________________________________
>> CentOS-pt-br mailing list
>> CentOS-pt-br em centos.org
>> http://lists.centos.org/mailman/listinfo/centos-pt-br
>>
>>
> _______________________________________________
> CentOS-pt-br mailing list
> CentOS-pt-br em centos.org
> http://lists.centos.org/mailman/listinfo/centos-pt-br
>
>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://lists.centos.org/pipermail/centos-pt-br/attachments/20120707/eee9e4ab/attachment.html 


Mais detalhes sobre a lista de discussão CentOS-pt-br