rodrigoubunto
(usa Ubuntu)
Enviado em 06/02/2013 - 16:27h
#para controle externo
http_port 3128
#cache internet
cache_dir ufs /var/spool/squid 100 16 256
cache_mem 100 MB
visible_hostname Server
#criacao de acls
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.1.1.0/24 # rede interna
acl sites_liberados url_regex -i "/etc/squid/acessototal"
acl mp3 urlpath_regex \.mp3
acl exe urlpath_regex \.exe
# Bloqueia MSN
acl msn url_regex -i /gateway/gateway.dll
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl Safe_ports port 465 #email div
acl Safe_ports port 587 #email div
acl Safe_ports port 993 #imap gmail
acl Safe_ports port 3128 #squid
acl purge method PURGE
acl CONNECT method CONNECT
#libera acesso horario de almoco
acl sites url_regex "/etc/squid/horariodealmoco"
acl h_almoco time MTWHF 10:59-12:59
acl blocked url_regex -i "/etc/squid/bloqueio"
#acl boletocaixa src 10.1.1.109
acl silma src 10.1.1.103
#acl leandro src 10.1.1.120
#acl leo src 10.1.1.121
acl kylvia src 10.1.1.110
acl mariana src 10.1.1.112
#acl germano src 10.1.1.101
acl beth src 10.1.1.104
#acl gabriela src 10.1.1.150
acl fabiana src 10.1.1.140
acl gilmar src 10.1.1.102
acl patricia src 10.1.1.125
acl rodrigo src 10.1.1.132
#acl telefonista src 10.1.1.115
#acl lilian src 10.1.1.105
#acl rodrigo2 src 10.1.1.141
#acl felipe src 10.1.1.123
#acl karina src 10.1.1.114
acl janisse src 10.1.1.107
acl maila src 10.1.1.108
#acl samara src 10.1.1.124
acl sergio src 10.1.1.131
#acl camila src 10.1.1.126
#fim liberacao horario de almoco
#tempo maximo de tentativa de retorno de um IP
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
#Valida Bloqueio MSN
http_access deny msn
#tudo que passar pelo firewall Bloqueia MSN
iptables -I FORWARD -s 10.1.1.0/24 -p tcp --dport 1863 -j REJECT
iptables -I FORWARD -s 10.1.1.0/24 -d loginnet.passport.com -j REJECT
#http_access allow gabriela !blocked
#http_access allow germano !blocked
http_access allow gilmar !blocked
http_access allow silma !blocked
#http_access allow leo !blocked
http_access allow beth
http_access allow fabiana !blocked
http_access allow mariana
#http_access allow leandro !blocked
http_access allow patricia !blocked
http_access allow rodrigo
http_access allow kylvia
#http_access allow boletocaixa !blocked
#http_access allow telefonista
#http_access allow lilian !blocked
#http_access allow rodrigo2
#http_access allow felipe
#http_access allow karina
http_access allow janisse !blocked
http_access allow maila
#http_access allow samara
http_access allow sergio
#http_access allow camila !blocked
http_access allow localnet sites h_almoco
http_access allow localnet sites_liberados
http_access deny localnet mp3
http_access deny localnet exe
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
#negar todo acesso as portas que nao liberadas
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
icp_access allow localnet
icp_access deny all
#porta usada squid
#http_port 3128
hierarchy_stoplist cgi-bin ?
#configuracoes proxy transparente
#httpd_accel_port 80
#httpd_accel_host virtual
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on
#echo 1 > /proc/sys/net/ipv4/ip_forward
#local log
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
hosts_file /etc/hosts
coredump_dir /var/spool/squid