renancasini
(usa Outra)
Enviado em 22/07/2015 - 15:43h
Meu squid:
# Autenticacao no Windows 2008
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 30
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 4 hours
acl AuthorizedUsers proxy_auth REQUIRED
acl bancos url_regex -i "/etc/squid/bancos"
http_access allow bancos
# Configuracoes gerais
http_port 3128
hierarchy_stoplist cgi-bin?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_replacement_policy lru
memory_replacement_policy lru
cache_mem 2 GB
maximum_object_size_in_memory 2048 KB
maximum_object_size 600 MB
minimum_object_size 1 KB
ipcache_size 2048
ipcache_low 80
ipcache_high 95
cache_dir aufs /var/spool/squid/1/ 23552 128 512
cache_dir aufs /var/spool/squid/2/ 23552 128 512
cache_dir aufs /var/spool/squid/3/ 23552 128 512
cache_dir aufs /var/spool/squid/4/ 23552 128 512
cache_replacement_policy lru
memory_replacement_policy lru
logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
access_log /var/log/squid/access.log squid
access_log daemon:/var/log/squid/access.log squid
cache_access_log /var/log/squid/access.log
cache_swap_log /var/spool/squid/swap.log
cache_mgr renan@redesedados.com.br
error_directory /usr/share/squid/errors/Portuguese
coredump_dir /var/spool/squid
refresh_pattern \^ftp: 1440 20% 10080
refresh_pattern \^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
# Definicao das ACLs
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 to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # snews
acl SSL_ports port 10000 # Webmin
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 407 # msn
acl Safe_ports port 25 # smtp
acl Safe_ports port 110 # pop
acl purge method PURGE
acl CONNECT method CONNECT
external_acl_type grupo_ad %LOGIN /usr/lib/squid/wbinfo_group.pl
#acl grp- external grupo_ad
# Criacao dos grupos
acl grp-admins external grupo_ad admins
acl grp-diretores external grupo_ad diretores
acl grp-gerentes external grupo_ad gerentes
acl grp-funcionarios external grupo_ad funcionarios
acl grp-estagiarios external grupo_ad estagiarios
# Regras Para Diretores
acl sitesd dstdomain -i "/etc/squid/sitesd"
acl palavrasd url_regex -i "/etc/squid/palavrasd"
acl downloadsd urlpath_regex -i "/etc/squid/downloadsd"
# Regras Para Gerentes
acl sitesg dstdomain -i "/etc/squid/sitesg"
acl palavrasg url_regex -i "/etc/squid/palavrasg"
acl downloadsg urlpath_regex -i "/etc/squid/downloadsg"
# Regras Para Funcionarios
acl sitesf dstdomain -i "/etc/squid/sitesf"
acl palavrasf url_regex -i "/etc/squid/palavrasf"
acl downloadsf urlpath_regex -i "/etc/squid/downloadsf"
# Regras Para Estagiarios
acl sitese dstdomain -i "/etc/squid/sitese"
acl almoco time 11:00-13:00
acl microsoft url_regex "/etc/squid/ms-update"
acl domain_watson dstdomain watson.microsoft.com
http_access allow microsoft
http_access allow domain_watson
# Ativando as ACLs Padrao
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
http_access allow localhost
http_access deny to_localhost
# Ativando as ACLs Personalizadas
http_access allow almoco
http_access allow grp-admins
http_access deny sitesd
http_access deny palavrasd
http_access deny downloadsd
http_access allow grp-diretores
http_access deny sitesg
http_access deny palavrasg
http_access deny downloadsg
http_access allow grp-gerentes
http_access deny sitesf
http_access deny palavrasf
http_access deny downloadsf
http_access allow grp-funcionarios
http_access deny grp-estagiarios !sitese
http_access allow sitese
http_access deny all