http_port 3128 # http_port 3128 transparent (caso seja transparente) visible_hostname CMM_SQUID client_netmask 255.0.0.0 # Configuracoes de cache, dono, logs, errors cache_effective_user squid cache_effective_group squid cache_mem 64 MB cache_dir diskd /etc/squid/cache 50000 32 256 Q1=64 Q2=72 cache_access_log /etc/squid/logs/access.log cache_log /etc/squid/logs/cache.log cache_store_log /etc/squid/logs/store.log error_directory /etc/squid/errors/portuguese # Atualização do cache hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY auth_param basic children 5 auth_param basic realm PMJ-BA Proxy auth_param basic credentialsttl 2 hours auth_param basic casesensitive off refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 # Palavras permitidas acl PALAVRAS_PERMITIDAS url_regex -i "/etc/squid/palavras_permitidas" http_access allow PALAVRAS_PERMITIDAS # Regras de bloqueio (o IP x somente tem acesso ao site y) acl site_restrito dstdomain "/etc/squid/site_restrito" acl ip_restrito src "/etc/squid/ip_restrito" http_access deny ip_restrito !site_restrito #IP's da rede local com tudo liberado acl ip_liberado src "/etc/squid/ip_liberado" http_access allow ip_liberado #IP's da rede local bloqueados #acl ip_bloqueado src "/etc/squid/ip_bloqueado #http_access deny ip_bloqueado # Regras de bloqueio de site ***por palavras acl palavra dstdom_regex "/etc/squid/palavras_negadas" http_access deny palavra # Filtro de palavras e sites acl SITES_PROIBIDOS url_regex -i "/etc/squid/sites_proibidos" http_access deny SITES_PROIBIDOS #Bloqueio de downloads por extensão #acl download url_regex -i .com$ .pif$ .exe$ .avi$ .mp3$ .mpeg$ .mpg$ .rm$ .wma$ .wmv$ .asx$ .cab$ .src$ #http_access deny extensoes.txt # ACL's da rede local acl REDE_INTERNA src 10.0.0.0/8 # ACL global e portas acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/255.255.255.255 acl SSL_ports port 443 563 acl Safe_ports port 80 8080 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 563 # https, snews acl Safe_ports port 10000 # webmin acl Safe_ports port 631 # cups acl Safe_ports port 901 # samba acl CONNECT method CONNECT # Validacao das redes local http_access allow REDE_INTERNA http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access deny all http_reply_access deny all !REDE_INTERNA icp_access deny all !REDE_INTERNA