Enviado em 18/11/2017 - 15:42h
Pessoal, estou com problemas para bloquear download pelo squid, estou usando o Centos 6.6 e squid 3.1.23.
Squid.conf:
------------------------------------------------------------------------------------------------------------------
## Autenticação ##
## Meus controles de acesso ##
#acl usuarios proxy_auth required
acl blockdownload urlpath_regex -i "/etc/squid/blockdownload.acl"
####
## HTTP_ACCESS ##
http_access deny blockdownload
#http_access allow usuarios
###
http_access allow localhost
http_access allow all
## Configuração gerais
# Squid normally listens to port 3128
http_port 3128
# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/spool/squid 300 16 256
access_log /var/log/squid/access.log squid
visible_hostname localhost
# Caminho de onde aparecem as mensagens dos usuários
# error_directory /usr/shared/squid/errors/pt-br
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid
# Add any of your own refresh_pattern entries above these.
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
-----------------------------------------------------------------------------------------
Arquivo blockdownload.acl:
\.mp3$
.mp3$
\.mp3(\?.*)?$
^.*.mp3$
($.mp3)
-----------------------------------
Coloquei vários tipos no arquivo blockdownload.acl para realizar alguns testes mas em nenhum caso funcionou.
Squid.conf:
------------------------------------------------------------------------------------------------------------------
## Autenticação ##
## Meus controles de acesso ##
#acl usuarios proxy_auth required
acl blockdownload urlpath_regex -i "/etc/squid/blockdownload.acl"
####
## HTTP_ACCESS ##
http_access deny blockdownload
#http_access allow usuarios
###
http_access allow localhost
http_access allow all
## Configuração gerais
# Squid normally listens to port 3128
http_port 3128
# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/spool/squid 300 16 256
access_log /var/log/squid/access.log squid
visible_hostname localhost
# Caminho de onde aparecem as mensagens dos usuários
# error_directory /usr/shared/squid/errors/pt-br
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid
# Add any of your own refresh_pattern entries above these.
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
-----------------------------------------------------------------------------------------
Arquivo blockdownload.acl:
\.mp3$
.mp3$
\.mp3(\?.*)?$
^.*.mp3$
($.mp3)
-----------------------------------
Coloquei vários tipos no arquivo blockdownload.acl para realizar alguns testes mas em nenhum caso funcionou.