Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cache_mem 512 MB
- maximum_object_size_in_memory 64 MB
- maximum_object_size 1024 MB
- minimum_object_size 0
- cache_swap_low 90
- cache_swap_high 95
- cache_dir ufs /home/temp/cache/squid 18000 8 64
- cache_access_log /var/log/squid/acesso.log
- cache_dir ufs /var/cache/squid 2048 8 16
- ##CONFIGURACAO BASICA DO SQUID
- acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
- acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
- acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
- acl localnet src fc00::/7 # RFC 4193 local private network range
- acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
- acl SSL_ports port 443 # https
- 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 # 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 CONNECT method CONNECT
- # Deny requests to certain unsafe portshttp_access deny !Safe_ports
- # Deny CONNECT to other than secure SSL ports
- #http_access deny CONNECT !SSL_ports
- #http_access deny to_localhost
- # DEFAULT CONFIGURATIONS
- coredump_dir /var/cache/squid
- #refresh_pattern ^ftp: 15 20% 2280
- refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
- #refresh_pattern . 15 20% 2280
- #Criando regras para cache de videos
- acl googlevideo dstdomain .googlevideo.com
- cache allow googlevideo
- acl youtube dstdomain .youtube.com
- cache allow youtube
- acl facebook dstdomain .facebook.com
- cache allow facebook
- # Windows Update refresh_pattern
- range_offset_limit -1
- refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims
- refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims
- refresh_pattern -i my.windowsupdate.website.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims
- # Windows Update end
- ##ADICIONANDO AS REGRAS
- acl download url_regex -i "/home/temp/sites/downloads"
- acl squid_porn dstdomain "/home/temp/sites/squid-porn.acl"
- acl squid_malicious dstdomain "/home/temp/sites/squid-malicious.acl"
- acl squid_ads dstdomain "/home/temp/sites/squid-ads.acl"
- ##BLOQUEANDO AS REGRAS
- http_access deny squid_porn
- http_access deny squid_malicious
- http_access deny squid_ads
- http_access deny download
- #Cache de video
- refresh_pattern -i \.flv$ 10080 90% 999999 ignore-no-cache override-expire ignore-private
- acl youtube dstdomain .youtube.com
- #cache allow youtube
- #quick_abort_min 512 KB
- #memory_pools off
- ##PERMISSÃO DE ACESSO AS REGRAS
- http_port 3128 transparent
- http_access allow localhost manager
- http_access allow localnet
- http_access allow localhost
- http_access allow all
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement