Tradutor

segunda-feira, 15 de dezembro de 2014

Squid.conf

#Modelo de Squid

##################################################
####                 VINICIUS FIGUEIREDO DIAS - ADM REDES                     ####
##################################################
# IP PROXY 10.0.0.206
# 29/04/2014 - CONFIGURACOES PADROES

# MENSAGEM DE ERRO EM PORTUGUES
error_directory /usr/share/squid/errors/Portuguese

# PORTA DO SQUID
http_port 3128 transparent

# NOME DO SERVIDOR
visible_hostname MODELOSQUID

# CACHE
cache_mem 700 MB
maximum_object_size_in_memory 32 KB
maximum_object_size 1024 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /etc/squid/cache 30000 16 256
cache_mgr ti@modelosquid.com.br

# LOGS DE ACESSO
cache_access_log /etc/squid/access.log squid

# REGRAS DE ACL PADRAO
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 SSL_ports port 443 563 873
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 873 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
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 901 # swat
acl Safe_ports port 1025-65535 # portas altas
acl purge method PURGE
acl CONNECT method CONNECT

# PERMISSOES E BLOQUEIOS
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

# PERMISSAO GERAL
acl libera_paul arp "/etc/squid/macpaul"
http_access allow libera_paul
acl libera_EscEmilio arp "/etc/squid/macAirGridEmilio"
http_access allow libera_EscEmilio
acl libera_EscJacutinga arp "/etc/squid/macAirGridJacutinga"
http_access allow libera_EscJacutinga
#acl libera_doctus arp "/etc/squid/macdoctus"
#http_access allow libera_doctus
#acl libera_QualitControl arp "/etc/squid/maccontrolequalidade"
#http_access allow libera_QualitControl
acl libera_Expedicao arp "/etc/squid/macexpedicao"
http_access allow libera_Expedicao
#acl libera_Compras arp "/etc/squid/maccompras"
#http_access allow libera_Compras
#acl libera_Recepcao arp "/etc/squid/macrecepcao"
#http_access allow libera_Recepcao

# BLOQUEIO DE SITES PROIBIDOS
acl sites_proibidos url_regex -i "/etc/squid/blacklist"
http_access deny sites_proibidos
acl redesocial url_regex -i "/etc/squid/sociallist"
acl periodo1 time MTWHF 00:00-12:00
acl periodo2 time MTWHF 13:15-23:59
http_access deny redesocial periodo1
http_access deny redesocial periodo2
acl dominios_proibidos dstdomain -i "/etc/squid/blacklistdomain"
http_access deny dominios_proibidos periodo1
http_access deny dominios_proibidos periodo2

# PERMISSAO REDE LOCAL E SERVIDOR
acl redelocal src 10.0.0.0/24
http_access allow localhost
http_access allow redelocal

# BLOQUEIO DE USUARIOS FORA DA REDE
http_access deny all