kptaokverna
(usa Fedora)
Enviado em 26/02/2013 - 11:52h
bom dia, estou postando de novo porque deu uma creca aqui...
como havia falado para vcs, usamos o squid com niveis de acesso, entre estes niveis de acesso, tenho 4ips q nao podem acessar a internet em um periodo de horario.
ate ai tudo bem a regra inicializa normal, bloqueia os sites dos q tentam abrir o navegador para acessar a internet, estes nao conseguem acesso., mas os que estao com o navegador aberto, continuam acessando normalmente, como posso fazer com q assim q o squid der o horario de bloqueio, ele derrube a conexao, mesmo estando com o navegador aberto?
meu proxy e transparente
meu squid.conf
#
# Recommended minimum configuration:
#
visible_hostname localhost
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
refresh_pattern windowsupdate.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern
www.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
refresh_pattern cache.googlevideo.com/.*\.(flv|avi|) 4320 100% 43200 reload-into-ims
refresh_pattern youtube.com/.*\.(flv|avi|) 4320 100% 43200 reload-into-ims
refresh_pattern update.nai.com/.*\.(zip|exe|cab|msi) 4320 100% 43200 reload-into-ims
refresh_pattern guru.grisoft.com/.*\.(zip|exe|cab|bin) 4320 100% 43200 reload-into-ims
refresh_pattern downloadfree.avg.com/.*\.(zip|exe|cab|bin) 4320 100% 43200 reload-into-ims
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl localhost src ::1/128
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl to_localhost dst ::1/128
# 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
#REDE DOS HOSPEDES
acl localnet src 192.168.100.1/32 # RFC1918 possible internal network
#acl localnet src 192.168.0.0/16 # 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
#LISTA E NIVEIS DE ACESSO.
#servidor vpn
acl nivel2 src 10.173.0.1
#SEM_CADASTRO
acl nivel1 src 10.173.0.2
#SEM_CADASTRO
pulei alguns ips para nao ficar muito grande o post....
#SEM_CADASTRO
acl nivel1 src 10.173.0.251
#SEM_CADASTRO
acl nivel1 src 10.173.0.252
#VIDEO
acl nivel1 src 10.173.0.253
#niveis de acls#
acl nivel1 src 192.168.111.42
acl nivel2 src 192.168.111.245
acl nivel3 src 192.168.111.145
#caixas q nao podem acessar a internet#
acl caixas src "/etc/squid/ips.bloqueados"
http_access allow localnet
http_reply_access allow localnet
acl BLOCKTALK url_regex -i mail.google.com/mail/channel/bind
http_access deny BLOCKTALK
#tempo de bloqueio#
acl tempo_bloqueio time 09:00-16:30
acl proibidos url_regex "/etc/squid/bloqueados"
acl liberados url_regex "/etc/squid/liberados"
#negando acesso aos caixas com o tempo de bloqueio#
http_access deny caixas tempo_bloqueio
http_access allow nivel1
http_reply_access allow nivel1
http_access deny proibidos
http_access allow nivel2
http_reply_access allow nivel2
http_access allow nivel3 liberados
http_reply_access allow nivel3 liberados
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 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
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# 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 transparent
# 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 16384 32 64
access_log /var/log/squid/access.log
# 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