Enviado em 06/06/2013 - 09:05h
Olá, acho que esse é meu primeiro post aqui, então se houver algum erro, relevem.
authoritative;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.50;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.1,8.8.8.8,201.10.128.2;
}
#Parametros de autencicação
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/passwd
auth_param basic children 5
auth_param basic credentialsttl 1 hour
auth_param basic realm SERVIDOR SQUID
auth_param basic casesensitive off
#REGRAS PADRAO
http_port 3128
visible_hostname SERVIDORDEBIAN
cache_dir ufs /var/cache/squid3 3000 16 256
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl SSL_ports port 443 563
acl Safe_ports port 80 21 81 70 210 888
acl CONNECT method CONNECT
acl autenticados proxy_auth REQUIRED
acl permitidos src 192.168.1.0/24
acl all src 192.168.1.0/24
#BLOQUEAR PAGINAS
acl sites url_regex -i "/etc/squid3/sites.txt"
http_access deny sites
#PALAVRAS
acl words url_regex -i "/etc/squid3/words.txt"
http_access deny words
#EXTENSÃO
acl extensions urlpath_regex -i "/etc/squid3/extensions.txt"
http_access deny extensions
http_access allow localhost
http_access allow autenticados permitidos
http_access deny all
modprobe ip_tables
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A INPUT -p tcp -s 192.168.1.1/255.255.255.0 -j ACCEPT