luizniero
(usa Ubuntu)
Enviado em 24/02/2015 - 11:32h
#########################################################
#########################################################
# PORTA ADRAO DO PROXY SQUID #
http_port 3128
# NOME DO PROXY SQUID #
visible_hostname Firewall
# ENDEREÇO DE EMAIL DO ADMINISTRADOR #
#cache_mgr emersonluys@gmail.com
# AUTENTICAÇÃO DOS USUARIOS NO PROXY #
#auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
#auth_param basic children 5
#auth_param basic realm >>> ATENCÃO, TODO O ACESSO É MONITORADO <<<
#auth_param basic credentialsttl 2 hours
# AUTENTICAÇÃO PADRÃODO PROXY SQUID #
#acl minharede proxy_auth REQUIRED
#DEFINE O TAMANHO MAXIMO DE UM OBJETO EM CACHE DE MEMORIA
cache_mem 64 MB
cache_dir ufs /var/spool/squid 512 128 256
# LOG DO CACHE SQUID #
access_log /var/log/squid/access.log squid
httpd_suppress_version_string on
# ENDEREÇO DE ERRO DO PROXY EM PORTUGUES #
error_directory /usr/share/squid/errors/Portuguese
# TAMANHO MAXIMO DE OBJETO EM CACHE LOCAL #
maximum_object_size_in_memory 64 KB
minimum_object_size 0 KB
maximum_object_size 700 MB
## PORCENTAGEM DO USO DO CACHE SQUID #
cache_swap_low 90
cache_swap_high 95
cache_log /var/log/squid/cache.log
# TEMPO DE ATUALIZAÇÃO DOS OBJETOS EM CACHE #
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
## SEGURANÇA DO CACHE #
acl manager proto cache_object
#LIMITA conexoes HTTP#
acl connect_abertas maxconn 10
# LIBERACAO ESPECIAL POR ENDERECO IP DA MAQUINA #
#acl liberados src "/etc/squid/regras/liberados"
#http_access allow liberados
# LIBERACAO DO SITE DA CAIXA POR DOMINIO #
acl caixa dstdomain .caixa.gov.br
always_direct allow caixa
cache deny caixa
## LIBERACAO ESPECIAL POR ENDERECO MAC DA MAQUINA #
#acl macliberado arp "/etc/squid/regras/mac_liberado"
#http_access allow macliberado
# SITE QUE NAO E FEITO CACHE GERALMENTE BANCOS #
acl NOCACHE url_regex "/etc/squid/regras/direto" \?
no_cache deny NOCACHE
# MINHAS ACL ' S #
# LIBERACAO ESPECIAL POR ENDERECO IP DA MAQUINA #
#acl liberados src "/etc/squid/regras/liberados"
#http_access allow liberados
# LIBERACAO DO SITE DA CAIXA POR DOMINIO #
acl caixa dstdomain .caixa.gov.br
always_direct allow caixa
cache deny caixa
## LIBERACAO ESPECIAL POR ENDERECO MAC DA MAQUINA #
#acl macliberado arp "/etc/squid/regras/mac_liberado"
#http_access allow macliberado
# SITE QUE NAO E FEITO CACHE GERALMENTE BANCOS #
acl NOCACHE url_regex "/etc/squid/regras/direto" \?
no_cache deny NOCACHE
# MINHAS ACL ' S #
#acl downloads_bloqueados urlpath_regex -i "/etc/squid/regras/downloads"
#acl sites_proibidos url_regex -i "/etc/squid/regras/sites_proibidos"
#acl sites_liberados url_regex -i "/etc/squid/regras/sites_liberados"
# MINHAS REGRAS #
#http_access deny downloads_bloqueados
#http_access deny sites_proibidos
#http_access allow sites_liberados
# ACL PADROES DO SISTEMA DE PROXY #
acl all src all
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 minharede src 192.168.1.0/24
acl localnet src 10.0.0.0/8 #RFC1918 possible internal network
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16 #RFC1918 possible internal network
acl SSL_ports port 443 #https
acl SSL_ports port 563 #snews
acl SSL_ports port 873 #rsync
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
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 631 #cups
acl Safe_ports port 873 #rsync
acl Safe_ports port 901 #swat
acl Safe_ports port 5500 #suporte pegasus
acl Safe_ports port 101 #pop3 terra
acl Safe_ports port 587 #email outlook terra
acl Safe_ports port 35070 #suporte prosoft
acl Safe_ports port 5555 #hardlock totvs
acl purge method PURGE
acl CONNECT method CONNECT #unregistred ports
http_access allow minharede
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost