Enviado em 21/06/2017 - 13:52h
Pessoal estou com alguns problemas com a rede aqui na empresa em que trabalho, mais especificamente no squid3, não tenho muita experiência com GNU Linux Debian8.hosts_file /etc/hosts
##### PARAMETROS DE DESEMPENHO #####
# MEMORIA RAM DEDICADA PARA O SQUID
cache_mem 256 MB
# MAXIMO OBJETO EM MEMORIA RAM
maximum_object_size_in_memory 128 KB
# MAXIMO OBJETO EM DISCO
maximum_object_size 64 MB
# ATUALIZACAO DE OBJETOS DO CACHE
cache_swap_low 80
cache_swap_high 95
# POLITICAS DE ARMAZENAMENTO NA RAM E EM CACHE DE DISCO
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
# LOCAL (/VAR/SPOOL/SQUID3/, TAMANHO (5 GB) E CONFIGURACAO DE PASTAS E DIRETORIO (64 DIRETORIOS X 512 SUBDIRETORIOS)
cache_dir aufs /var/spool/squid3/ 5000 32 512
### LOGS DO SQUID
# LOG DE ACESSOS
cache_access_log /var/log/squid3/access.log
# ATIVA O LOG DO SQUID
cache_log /dev/null
# LOG DE ARMAZENAMENTO DO ARQUIVOS NO CACHE
cache_store_log /dev/null
# POLITICA PARA ROTACIONAR O LOG
logfile_rotate 1
## CACHE DE ENTRADAS DNS
# CACHE DE NOMES (PADRAO 1024)
fqdncache_size 131072
# CACHE IP
ipcache_size 131072
# SERVIDORES DE DNS (DCMETA)
dns_nameservers 192.168.20.2
dns_nameservers 192.168.20.3
dns_nameservers 200.255.253.241
dns_nameservers 208.67.222.222
dns_nameservers 208.67.220.220
# ARMAZENAR ESTATISTICAS DO CLIENTE
client_db on
##############################################################################################################################
# aumentar o tempo de cache de figuras
#refresh_pattern (jpg|png|gif|html|css|htm|jpeg|bmp)$ 9999999 9999999% 9999999 override-expire override-lastmod stale-while-revalidate=5199999
########################################################################################################################
### REFRESH
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
### ACLS
#acl manager proto cache_object
acl localhost src 127.0.1.1/32
acl localnet src 192.168.1.0/24
########### ACL ESPECIFICAS ###########################################################
# ACL ATIVACAO MICROSOFT #############################################################
acl active dstdomain .microsoft.com .hotmail.com .live.com
no_cache deny active
http_access allow active
## PORTAS USADAS
# COM SSL (SECURITY SOCKET LAYER)
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
# PORTAS NOMAIS
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, 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 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl Safe_ports port 81
acl Safe_ports port 2096
acl Safe_ports port 88
acl Safe_ports port 8999 # Liberacao para o HOD
acl Safe_ports port 23000 # Liberacao para o HOD
acl purge method PURGE
acl CONNECT method CONNECT
##################################################
# ACLs Locais
##################################################
# ACLS do sqStat
acl manager url_regex -i ^cache_object:// /squid-internal-mgr/
acl webserver src 192.168.1.64/32
# ACL TODOS OS USUARIOS/HOSTS
#acl all src 192.0.0.0/8
# ACL REDE INTERNA
acl REDE_INTERNA src 192.168.0.0/16
# ARQUIVOS PARA DELAY DIFERENCIADO
acl ARQUIVOS_BANDA url_regex -i .exe .zip .arj .rar .flv .iso
acl teste src 192.168.60.30
### PERMISSAO E BLOQUEIO DE ACESSO PARA AS ACLS DEFINIDAS
http_access allow teste
http_access allow purge localhost
http_access deny purge
http_access allow manager webserver
http_access deny manager
# PERMITE APENAS AS PORTAS DEFINIDAS COMO SEGURAS
http_access deny !Safe_ports
# PERMITE O METODO CONNECT APENAS PARA AS PORTAS COM SSL (SECURITY SOCKET LAYER)
http_access deny CONNECT !SSL_ports
### REDIRECIONAMENTO PARA SQUID GUARD NA MESMA MÃQUINA
redirect_program /usr/bin/squidGuard -c /etc/squid3/squidGuard.conf
# NUMERO DE PROCESSOS FILHOS CRIADOS PARA O DIRECIONAMENTO SQUIDGUARD
redirect_children 32
# PARA O SQUID NAO PARAR EM CASO DE ERRO
redirector_bypass on
# PERMITE ACESSO A REDE INTERNA
http_access allow REDE_INTERNA
# PERMITE ACESSO A MAQUINA LOCAL
http_access allow localhost
# NEGA ACESSO AO RESTANTE (ULTIMA REGRA)
http_access deny all
http_reply_access allow all
# NOME DO PROXY - PARA DIFERENCIAR QUANDO É USADO HIERARQUIA
visible_hostname fwmeta
# MENSAGEM DE ERROS EM PORTUGUES
error_directory /usr/share/squid3/errors/Portuguese
#####################################
# INICIO CONTROLE DE BANDA
#####################################
## NUMERO LIMITADORES DE BANDA (2)
delay_pools 2
## PARAMETROS DA POLL 1
# POLL 1 CLASSE 1
delay_class 1 1
# PARAMENTROS DO POLL 1
#( POLL 1, BANDA LIBERADA PARA AGREGADO => -1/-1 e 512Kb PARA INICIO DE CONEXÃO E 256Kb DE FINAL)
delay_parameters 1 -1/-1 32000/64000
# APLICA A POLL 1 A REDE LOCAL DEFINIDA NA ACL
delay_access 1 allow REDE_INTERNA
# POLL 2 CLASSE 2
delay_class 2 2
# PARAMENTROS DO POLL 2
delay_parameters 2 -1/-1 262144/32768
# APLICA A POLL 2 A ACL ARQUIVOS_BANDA
delay_access 2 allow ARQUIVOS_BANDA
#########################################################################
## PORTA USADA PELO SQUID
http_port 3128