#Config Iptables para squid
#/sbin/modprobe
iptables_nat
iptables -F
iptables -t nat -F
iptables -P INPUT
DROP
iptables -t nat -A PREROUTING -s 0/0 -p tcp --dport 80 -j REDIRECT
--to-port 3128
iptables -t nat -A PREROUTING -s 0/0 -p udp --dport 80 -j
REDIRECT --to-port 3128
visible_hostname patrick # Nome do
computador
#Config Squid.conf
http_port 192.168.1.1:3128
hierarchy_stoplist cgi-bin ?
cache_mem
100 MB
cache_swap_low 100
cache_swap_high 95
maximum_object_size 4096
KB
#cache_dir ufs /var/cache/squid 1000 16 256
acl all src
0.0.0.0/0.0.0.0
acl manager proto cache_object
acl HTTP proto http
acl
localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl
Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl smtp port 110
#
acl pop port 25 #
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 Proibir_palavras url_regex -i
"/etc/squid/palavras/palavras.txt" #txt onde estão as palavras a bloquear
acl
libera_site url_regex -i "/etc/squid/palavras/libera.txt
acl libera_ip src
192.168.1.3/255.255.255.255
# Bloquear MSN
acl HOST_MSN src
192.168.1.1/255.255.255.0
acl proibir_msn url_regex -i
"/etc/squid/palavras/msn.txt"
acl NEGAR_MSN2 url_regex
"/etc/squid/palavras/msn2.txt"
acl msn url_regex -i
/gateway/gateway.dll
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
purge method PURGE
acl CONNECT method CONNECT
#http_access allow
libera_ip
#http_access allow libera_site
#http_access deny
all
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
#Bloqueio MSN
#http_access allow HOST_MSN
#http_access
deny proibir_msn
#http_access deny Negar_MSN2
#http_access deny
msn
visible_hostname patrick # Nome do computador
http_access
allow smtp
http_access allow pop
http_access deny
Proibir_palavras
acl redelocal src 192.168.1.0/24 # IP da sua
Rede
http_access allow localhost
http_access allow
redelocal
http_access allow all