cabralwms
(usa Debian)
Enviado em 15/03/2012 - 09:27h
#
# Recommended minimum configuration:
#
#http_port 192.168.0.1:3123 transparent
http_port 192.168.0.1:3123 intercept
hierarchy_stoplist cgi-bin ?
#acl QUERY urlpath_regex cgi-bin \?
#no_cache deny QUERY
#
#Configuracao nova
cache_mem 128 MB # Se seu servidor for dedicado, coloque neste valor a metade de sua memó RAM, do contráo use apenas 25%
#dns_nameservers 192.168.0.1
maximum_object_size_in_memory 512 KB
maximum_object_size 4096 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 6000 16 256
#cache_dir ufs /var/spool/squid2 2000 16 256
#cache_dir ufs /var/spool/squid3 2000 16 256
cache_access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/log/squid/squid.pid
#debug_options ALL,1
#
logfile_rotate 2
cache_replacement_policy lru
memory_replacement_policy lru
# We recommend you to use at least the following line.
#
#Add any of your own refresh_pattern entries above these.
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
cache_effective_user squid
cache_effective_group squid
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid/
#coredump_dir none
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
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
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 465 # SMTP
acl Safe_ports port 587 # SMTP
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 10060 # Mysql comunicacao
acl Safe_ports port 10061 # Mysql comunicacao
acl Safe_ports port 3306 # Mysql server
acl CONNECT method CONNECT
#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
acl nivel01 src 192.168.0.4 # Marcelo
acl nivel01 src 192.168.0.24 # Marcelo
acl nivel01 src 192.168.0.49 # Cris
acl nivel01 src 192.168.0.16 # Re
acl nivel01 src 192.168.0.17 # Re android
acl nivel01 src 192.168.0.12 # Ricardo
acl nivel01 src 192.168.0.6 # Nelson
acl nivel02 src 192.168.0.159 # note
acl nivel01 src 192.168.0.5 #Eduardo
acl nivel02 src 192.168.0.41 # Claudio
acl nivel02 src 192.168.0.44 #Ryu
acl nivel02 src 192.168.0.32 #Kleiton Html1
acl nivel02 src 192.168.0.48 #Henrique Html3
acl nivel02 src 192.168.0.47 #Guilherme Html2
acl nivel03 src 192.168.0.40 #Recepcao
acl nivel03 src 192.168.0.240 #Antonio
acl nivel03 src 192.168.0.39 #Mauro
acl nivel03 src 192.168.0.9 #Denise
acl nivel03 src 192.168.0.27 #Kessya
#
#nivel04 todos ips que não detalhados a cima
acl semnet src 192.168.0.30
acl semnet src 192.168.0.29
#acl semnet src 192.168.0.159
# IPs para msn
acl somsn src 192.168.0.5 #
acl somsn src 192.168.0.6 #
acl somsn src 192.168.0.39 #
acl somsn src 192.168.0.40 #
acl somsn src 192.168.0.41 #
acl somsn src 192.168.0.44 #
acl somsn src 192.168.0.32 #
acl somsn src 192.168.0.48 #
acl somsn src 192.168.0.47 #
acl somsn src 192.168.0.27 #
acl somsn src 192.168.0.159 #
#
#acl lista_livre url_regex -i "/etc/squid/livre.dstdomain.acl"
#acl blkdstdomain dstdomain -i "/etc/squid/block.dstdomain.acl"
#acl blkurlregex url_regex "/etc/squid/block.url-regex.acl"
#acl internet_domain dstdomain -i "/etc/squid/internet.domain.acl"
#acl internet_palavras url_regex -i "/etc/squid/internet.palavras.acl"
#
# Livre para almoco menos downloads e proibidos
acl almoco time 12:20-13:00
acl cafe1 time 9:00-9:15
acl cafe2 time 15:30-15:45
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#acl livre src "/etc/squid/conf/livre"
acl palavras2 url_regex -i "/etc/squid/conf/palavras2"
acl palavras3 url_regex -i "/etc/squid/conf/palavras3"
acl palavras4 url_regex -i "/etc/squid/conf/palavras4"
acl exceto_palavras url_regex -i "/etc/squid/conf/exceto_palavras"
acl exceto_dominio dstdomain -i "/etc/squid/conf/exceto_dominio"
#acl domains dstdomain -i "/etc/squid/domains"
acl dominio2 dstdomain -i "/etc/squid/conf/dominio2"
acl dominio3 dstdomain -i "/etc/squid/conf/dominio3"
acl down urlpath_regex -i "/etc/squid/conf/down" #extensoes
acl almoco_palavras url_regex -i "/etc/squid/conf/almoco_palavras"
acl msn url_regex -i /gateway/gateway.dll
# # vale para todos independente do IP
http_access allow nivel01
http_access allow exceto_palavras
http_access allow exceto_dominio
http_access deny almoco_palavras
http_access deny msn !somsn
http_access deny semnet
http_access deny palavras2
http_access deny dominio2
http_access allow nivel02 !palavras2 !dominio2
http_access deny palavras3
http_access deny dominio3
http_access allow nivel03 !palavras3 !dominio3 !palavras2 !dominio2
http_access deny palavras4 !nivel01 !nivel02 !nivel03
#http_access deny palavras4 # palavras proibidas, só libera no almoço
http_access deny down
#
#
##http_access deny blkdstdomain
#http_access deny internet_palavras
http_access allow localnet
http_access allow localhost
#http_access allow lista_livre
http_access allow almoco !down !almoco_palavras
http_access allow cafe1 !down !almoco_palavras
http_access allow cafe2 !down !almoco_palavras
# And finally deny all other access to this proxy
http_access deny all