Cache no Squid

1. Cache no Squid

André Luiz Carlim dos Santos
andré carlim

(usa Outra)

Enviado em 13/11/2008 - 19:54h

Galera seguinte to ficando meio loko num consigo fazer rodar o cache do squid na rede segue o arquivo.

OBS: o usuario "everyone" eu criei usando # adduser everyone


--------------------------------------------------------------------
# Squid Firewall

http_port 3128 transparent
visible_hostname firewall
error_directory /usr/share/squid/errors/Portuguese/


# Regras Primarias

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
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 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 Primarias

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


# Controle de Banda

acl download url_regex -i ftp .iso
acl bandaadmin src 192.168.1.0-192.168.1.255
acl bandacliente src 192.168.2.2-192.168.255.255
delay_pools 2
delay_class 1 2
delay_parameters 1 -1/-1 -1/-1
delay_access 1 allow bandaadmin
delay_class 2 2
delay_parameters 2 206000/206000 206000/206000
delay_access 2 allow bandacliente


# Http Cache

cache_mem 64 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 512 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /mnt/sda3/webcache 2048 16 256
cache_access_log /var/log/squid/access.log
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
cache_effective_user everyone
cache_effective_group everyone


# Bloqueios Indesejados

acl bloqueados url_regex -i "/etc/squid/bloqueados"
acl bloqueados url_regex -i "/dados/sites1.txt"
acl bloqueados url_regex -i "/dados/sites.txt"
http_access deny bloqueados

acl palavrasproibidas dstdom_regex "/etc/squid/palavrasproibidas"
http_access deny palavrasproibidas


# Regras Secundarias

acl redelocal src 192.168.0.0/255.255.0.0
http_access allow localhost
http_access allow redelocal
http_access deny all

# deny_info http://www.pudim.com.br bloqueados palavrasproibidas

# Fim do Arquivo
--------------------------------------------------------------------------------------



  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts