tiago2001
(usa Debian)
Enviado em 02/04/2011 - 23:02h
Dá uma olhada aí pra ver se vai, só presta atenção do no dns_nameserver e na sua rede local que pode ser diferente da minha
http_port 3128
cache_mem 128 MB
ie_refresh on
error_directory /usr/share/squid/errors/Portuguese
# Tamanho maximo dos arquivos guardados na RAM
maximum_object_size_in_memory 256 KB
#TAMANHO MAXIMO E MINIMO NO DISCO
maximum_object_size 700 MB
minimum_object_size 0 KB
# DESCARTAR CACHE
cache_swap_low 90
cache_swap_high 95
# ESPACO HD PASTAS SUBPASTAS
cache_dir ufs /cache/squid 12000 16 256
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
dns_nameservers 10.1.5.35 10.1.2.44
#hosts_file /etc/hosts
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 15 20% 2280
acl all src 0.0.0.0/0.0.0.0
never_direct allow all
miss_access allow all
icp_access allow all
#Recommended minimum configuration:
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443 563
acl SSL_ports port 8443 240 # Siafem
acl Safe_ports port 80 240 # http
acl Safe_ports port 809 # SPTRNAS
acl Safe_ports port 21 # ftp
acl Safe_ports port 22 # ftp
acl Safe_ports port 23 # Siafic]sico
acl Safe_ports port 53 # x
acl Safe_ports port 88 # x
acl Safe_ports port 443 # https
acl Safe_ports port 563 # snews
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 Safe_ports port 8443 # Siafem
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
############################### AUTENTICACAO ################################
auth_param basic program /etc/squid/users/ncsa_auth /etc/squid/users/passwd
auth_param basic realm Digite seu usuario e senha para entrar
auth_param negotiate children 5
auth_param negotiate keep_alive off
auth_param ntlm children 5
auth_param digest children 5
auth_param basic children 5
authenticate_ip_ttl 0 seconds
#############################################################################
########################### Acl de login por grupo ##########################
acl full proxy_auth "/etc/squid/grupos/full"
acl videos proxy_auth "/etc/squid/grupos/videos"
acl liberado proxy_auth "/etc/squid/grupos/liberado"
acl caism proxy_auth "/etc/squid/grupos/caism"
acl restrito proxy_auth "/etc/squid/grupos/restrito"
#############################################################################
############################Acl Bloqueio de conteudo#########################
acl bloqueiatudo url_regex -i "/etc/squid/regras/bloqueiatudo"
acl sitesbloqueados url_regex -i "/etc/squid/regras/sitesbloqueados"
acl sitesliberados url_regex -i "/etc/squid/regras/sitesliberados"
acl sitescaism url_regex -i "/etc/squid/regras/sitescaism"
acl especifico url_regex -i "/etc/squid/regras/especifico"
acl musica urlpath_regex -i "/etc/squid/regras/musica"
acl streaming rep_mime_type ^video/x-ms-asf
#############################################################################
#------------Usuarios sem restricao------------
http_access allow full
#----------------------------------------------
#-------------Usuarios liberados---------------
http_access allow especifico
http_access deny sitesbloqueados
http_access deny musica !full
http_reply_access deny streaming !full !videos
http_access allow videos
http_access allow liberado
#----------------------------------------------
#------------Usuarios restritos e caism----------------
http_access allow sitesliberados
http_access deny bloqueiatudo
http_access allow restrito
#-----------------------------------------------
acl redelocal src 192.168.0.0/16
http_access allow localhost
http_access allow redelocal
#miss_access allow redelocal
#icp_access allow redelocal
http_access allow localnet
#miss_access allow localnet
#icp_access allow localnet
http_access deny all