magubuntu
(usa Ubuntu)
Enviado em 23/11/2014 - 13:06h
http_port 3128 transparent
visible_hostname Firewall
cache_mem 256 MB
cache_swap_low 90
cache_swap_high 95
cache_dir aufs /var/spool/squid3 5000 16 256
maximum_object_size 4096 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 512 KB
access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
mime_table /usr/share/squid3/mime.conf
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
quick_abort_max 16 KB
quick_abort_pct 95
quick_abort_min 16 KB
request_header_max_size 20 KB
reply_header_max_size 20 KB
request_body_max_size 0 KB
acl manager proto cache_object
acl webserver src 192.168.0.2/32
http_access allow manager webserver
http_access deny manager
acl all src
acl localhost src 127.0.0.1
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
#Tentativa de Liberar sites por fora do squid
acl siteporfora url_regex -i "/etc/squid3/acls/siteporfora.txt"
always_direct allow siteporfora
#acl siteporfora dstdomain "/etc/squid3/acls/siteporfora.txt"
#http_access allow siteporfora
#LIBERA NET PELO MAC
acl libera_mac arp "/etc/squid3/acls/libera_mac.txt"
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
#Declarando a rede local
acl redelocal src 192.168.0.0/24
# acl para liberar acesso a pagina de erro
acl pagina_erro url_regex -i 192.168.0.2
#http_access deny bloquear_sociais
http_access allow libera_mac
http_access allow localhost
http_access allow pagina_erro
#http_access deny redelocal
http_access deny redelocal !pagina_erro
########### CONTROLE DE BANDA ###########
# === Libera e restringe a banda para alguns ips
acl ipsliberados src "/etc/squid3/acls/ipsliberados"
acl ipsrestritos src "/etc/squid3/acls/ipsrestritos"
# Significa que teremos dois controles de banda
delay_pools 2
# Primeiro controle de banda
delay_class 1 2
# -1/-1 significa que nao teremos limites para a delay pool 1
delay_parameters 1 -1/-1 -1/-1
delay_access 1 allow ipsliberados
# Segundo controle de banda
delay_class 2 2
# Banda total = 10240 kbits
# Banda total usada pelo squid 80% = 8192 kbits = 1048576 bytes
# Banda reservada para outros protocolos 20% = 2048 kbits
# Banda usada por usuarios = +- 256 kbytes
#delay_parameters 2 209664/209664 131072/131072
delay_parameters 2 1048576/1048576 262144/262144
delay_access 2 allow ipsrestritos
#Bloqueia o que nao tiver liberado acima
http_access deny all
error_directory /usr/share/squid3/errors/pt-br/
Ao digitar o comando: squid -k reconfigure nao recebi nenhum erro!