
		raimundofr
		
		(usa Ubuntu)
		
		Enviado em 01/11/2015 - 19:38h 
		Boa noite Pessoal,
Fiz uma configuração no squid para bloquear alguns usuário por dia e hora. Mas não funciona. Já tentei várias coisas e nada funcionou. Meu squid.conf esta assim:
#AUTENTICAÇÃO
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/usuarios
auth_param basic realm Digite usuario e senha para navegar
auth_param basic children 5
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
# Recommended minimum configuration:
#
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 192.168.0.0/24	# RFC1918 possible internal network
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
#MINHAS ACLs
acl autenticados proxy_auth REQUIRED
acl sitesbloqueados url_regex -i "/etc/squid/listas/sitesbloqueados"
#Redes Sociais
acl redessociais url_regex -i "/etc/squid/listas/redessociais"
acl diretoria proxy_auth diretor
acl usr_restritos proxy_auth "/etc/squid/listas/usr_restritos"
acl estagiarios proxy_auth "/etc/squid/listas/usr_estagiarios"
acl redessociaishora time MTWHF
#Pornografia
acl pornografia url_regex -i "/etc/squid/listas/sitespornografia"
#Sites Fatec
acl sitesfatec url_regex -i "/etc/squid/listas/sitesfatec"
acl sitesfatec_libera_estagiario time WHF 11:00-15:00
#Site SORC
acl sitesorc url_regex sorc.com.br
acl liberasitesorc time W 19:00-22:40
#MINHAS ACLs
http_access allow redessociais redessociaishora usr_restritos 
#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
#MINHAS HTTP_ACCESS
http_access deny sitesbloqueados
http_access deny pornografia
http_access deny estagiarios redessociais 
#Bloqueia redes sociais para estagiarios
#http_access allow redessociaishora usr_restritos redessociais 
# Libera para coordenador e tecnico MTWHF 12:00-14:00
http_access allow redessociais diretoria
http_access allow sitesfatec diretoria usr_restritos
http_access allow estagiarios sitesfatec_libera_estagiario 
#Libera site fatec para estagiarios na quarta 19 as 22:40
http_access allow autenticados sitesorc liberasitesorc
http_access allow autenticados 
#MINHAS HTTP_ACCESS
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
# Squid normally listens to port 3128
http_port 3128
visible_hostname sorclinux
# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?
# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid
error_directory /usr/share/squid/errors/pt-br
# 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