+ Responder ao Tópico



  1. #1

    Lightbulb Squid e firewall

    Boa tarde amigos,


    Meu squid com firewall com o seguinte erro, quando o usuário tira o proxy do navegador passa direto navega na net sem restrições. Isso quando o usuário está pegando ip via dhcp, o mais interessante que com os ips que são liberados, quando retiro o proxy funciona bloqueia, aparentemente está funcionando ao inverso. Alguém poderia da uma força??? vou posta-los aqui....

    Código :
    [COLOR=#333333][FONT=Helvetica Neue]Firewall[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#!/bin/bash[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Limpa todas as regras[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -F INPUT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -F OUTPUT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -F FORWARD[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P INPUT ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P OUTPUT ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P FORWARD ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -F[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Cria regra default para Chains[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P OUTPUT ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P FORWARD DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P INPUT DROP[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Carrega modulos do iptables[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_tables[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_conntrack[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_conntrack_ftp[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_conntrack_irc[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe iptable_nat[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_nat_ftp[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ipt_string[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]echo 0 > /proc/sys/net/ipv4/conf/all/log_martians[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]echo 1 > /proc/sys/net/ipv4/ip_forward[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]echo 1 > /proc/sys/net/ipv4/tcp_syncookies[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]echo 1 > /proc/sys/net/ipv4/ip_dynaddr[/FONT][/COLOR]
     
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Libera Rede Interna [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -I INPUT -i lo -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -I INPUT -i eth0 -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -I INPUT -i eth1 -j ACCEPT[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Libera Logmein[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -i eth1 -p tcp -d 216.52.233.0/24 --dport 443 -j ACCEPT[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#Bloqueia a porta 80 pra toda rede como no exemplo abaixo:[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Bloqueio da Porta 80 TCP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --destination-port 80 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p tcp --destination-port 443 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p tcp --destination-port 445 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p udp --destination-port 137 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p udp --destination-port 138 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p udp --destination-port 139 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -t nat -A PREROUTING -p tcp -i eth1 -p tcp --dport 80 -j REDIRECT --to port 3128[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j REDIRECT --to-port 3128[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -t filter -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -t filter -j ACCEPT -m state --state ESTABLISHED,RELATED,NEW [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#LIBERA DNS SERVER PARA A REDE[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p udp --dport 53 -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 53 -j ACCEPT[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# LIBERA PORTA PARA CAMERA[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -j DNAT --to 192.168.0.191 -i eth0 -d 192.168.1.9 -p tcp --dport 7000[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -j ACCEPT -i eth0 -o eth1 -s 0/0 -d 192.168.1.191 -p tcp --dport 7000[/FONT][/COLOR]
     
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Bloqueio ultra-surf[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp -d 65.49.2.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp -d 65.49.14.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 19769 -j DROP[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]##PROTECOES[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Protege contra port scanners avan?ados (Ex.: nmap)[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A INPUT -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 20/m -j ACCEPT[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Bloqueando tracertroute[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A INPUT -p udp -s 0/0 -i eth0 --dport 33435:33525 -j DROP[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Protecoes contra ataques[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A INPUT -m state --state INVALID -j DROP[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#BARRANDO ACESSO AO NTOP PARA O MUNDO E LIBERANDO PARA REDE INTERNA[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3000 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 3000 -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t filter -A INPUT -i eth1 -p tcp --dport 3000 -j ACCEPT[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#iMesh: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 216.35.208.0/24 -j DROP[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#Bloqueando os -:P2P:- (se voc? deseja utilizar um desses softwares, apenas retire o coment?rio # e substitua a condi??o de: REJECT, para ACCEPT) [/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 6881:6889 -j DNAT --to-dest 192.168.1.250[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp -i eth0 --dport 6881:6889 -d 192.168.1.250 -j DROP [/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#BearShare: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 6346 -j DROP [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#WinMX: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 209.61.186.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 64.49.201.0/24 -j DROP [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Napigator: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 209.25.178.0/24 -j DROP[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Morpheus: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 206.142.53.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 1214 -j DROP[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#KaZaA: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 213.248.112.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 1214 -j DROP [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Limewire: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 6346 -j DROP [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Audiogalaxy: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 64.245.58.0/23 -j DROP [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -m string --string "find_node" --algo bm -j DROP[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]Squid[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#squid.conf[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Autenticacao[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic children 5[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic credentialsttl 2 hours[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]authenticate_cache_garbage_interval 10 minutes[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]authenticate_ttl 10 minutes[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]authenticate_ip_ttl 0 seconds[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic realm Autenticador, Digite seu Login e Senha.[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic children 5[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic program /usr/lib/squid3/ncsa_auth /etc/shadow[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#http_port 3128 transparent[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_port 192.168.1.250:3128[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]visible_hostname atenas[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]error_directory /usr/share/squid3/errors/Portuguese[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#Diretorio do cache[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_dir aufs /var/cache/squid3 4096 16 256[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Log[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_access_log /var/log/squid3/access.log[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Porcentagem de atualizacao do cache -limpo ao atingir o maximo[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_swap_low 85[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_swap_high 90[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Memoria do cache[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_mem 512 MB[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Usar o maximo de memoria possivel[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#memory_pools on[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#memory_pools_limit 2048 MB[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Tamanho maximo de arquivos alocados na RAM[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]maximum_object_size_in_memory 2048 KB[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#Maximo e Minimo armazenados no disco[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]maximum_object_size 512 MB[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]minimum_object_size 0 KB[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Portas Liberadas[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl SSL_ports port 443[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl SSL_ports port 10000 # Webmin HTTPS[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 80 # http[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 21 # ftp[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 443 # https[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 70 # gopher[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 210 # wais[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 1025-65535 # unregistered ports[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 280 # http-mgmt[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 488 # gss-http[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 591 # filemaker[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 777 # multiling http[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 10000 # Webmin[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 3306 # Cartago[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 82 # conectividade digital[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 81 # conectividade digital[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 3443 # Sped receita federal[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 3337 # Sped[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 3338 # Sped[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny !Safe_ports[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# ACL PARA CONEXAO METODO SSL[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl CONNECT method CONNECT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny CONNECT !SSL_ports[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACLs PARA IP LIBERADO[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl ip_liberado src "/etc/squid3/ip_liberado"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access allow ip_liberado[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# ACLs PARA SITES LIBERADOS[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_liberados url_regex -i "/etc/squid3/sites_liberados"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access allow sites_liberados[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# ACLs PARA SITES BLOQUEADOS[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_bloqueados url_regex -i "/etc/squid3/bloqueados"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_bloqueados[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL PARA BLOQUEAR PROXY ANONIMO[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_proxy url_regex -i "etc/squid3/proxy"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_proxy[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL PARA BLOQUEIO DE SPYWARES[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_spywares url_regex -i "etc/squid3/spywares"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_spywares[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL PARA BLOQUEIO EM BLOG E CHAT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_blogchat url_regex -i "/etc/squid3/blogchat"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_blogchat[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL PARA BLOQUEIO DE MUSICAS[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_musicas url_regex -i "etc/squid3/musicas"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_musicas[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL STREAMING DE AUDIO E VIDEO[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl streaming req_mime_type ^video/x-ms-asf [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl proibir_musica urlpath_regex -i .aif$ .aifc$ .aiff$ .asf$ .asx$ .avi$ .au$ .m3u$ .med$ .mp3$ .m1v$ .mp2$ .mp2v$ .mpa$ .mov$ .mpe$ .mpg$ .mpeg$ .ogg$ .pls$ .ram$ .ra$ .ram$ .snd$ .wma$ .wmv$ .wvx$ .mid$ .midi$ .rmi$ [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny proibir_musica [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_reply_access deny streaming[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#CONTROLE DE BANDA[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl liberado src "/etc/squid3/liberado"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl limitado src "/etc/squid3/limitado"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_pools 2[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_class 1 2[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_parameters 1 -1/-1 -1/-1[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_access 1 allow liberado[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_class 2 2[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_parameters 2 1280000/1280000 1280000/1280000[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_access 2 allow limitado[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Politicas para rede local[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#http_access allow locanet[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#http_access deny all[/FONT][/COLOR]

    Alguma sugestão ficaria agradecido.
    Última edição por ab5x2; 24-07-2015 às 13:03.

  2. #2

    Padrão

    Citação Postado originalmente por xlinux Ver Post
    Boa tarde amigos,


    Meu squid com firewall com o seguinte erro, quando o usuário tira o proxy do navegador passa direto navega na net sem restrições. Isso quando o usuário está pegando ip via dhcp, o mais interessante que com os ips que são liberados, quando retiro o proxy funciona bloqueia, aparentemente está funcionando ao inverso. Alguém poderia da uma força??? vou posta-los aqui....

    Código :
    [COLOR=#333333][FONT=Helvetica Neue]Firewall[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#!/bin/bash[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Limpa todas as regras[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -F INPUT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -F OUTPUT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -F FORWARD[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P INPUT ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P OUTPUT ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P FORWARD ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -F[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Cria regra default para Chains[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P OUTPUT ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P FORWARD DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -P INPUT DROP[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Carrega modulos do iptables[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_tables[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_conntrack[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_conntrack_ftp[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_conntrack_irc[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe iptable_nat[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ip_nat_ftp[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]modprobe ipt_string[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]echo 0 > /proc/sys/net/ipv4/conf/all/log_martians[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]echo 1 > /proc/sys/net/ipv4/ip_forward[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]echo 1 > /proc/sys/net/ipv4/tcp_syncookies[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]echo 1 > /proc/sys/net/ipv4/ip_dynaddr[/FONT][/COLOR]
     
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Libera Rede Interna [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -I INPUT -i lo -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -I INPUT -i eth0 -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -I INPUT -i eth1 -j ACCEPT[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Libera Logmein[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -i eth1 -p tcp -d 216.52.233.0/24 --dport 443 -j ACCEPT[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#Bloqueia a porta 80 pra toda rede como no exemplo abaixo:[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Bloqueio da Porta 80 TCP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --destination-port 80 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p tcp --destination-port 443 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p tcp --destination-port 445 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p udp --destination-port 137 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p udp --destination-port 138 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -A FORWARD -p udp --destination-port 139 -s 192.168.1.0/24 -j DROP[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -t nat -A PREROUTING -p tcp -i eth1 -p tcp --dport 80 -j REDIRECT --to port 3128[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j REDIRECT --to-port 3128[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -t filter -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -t filter -j ACCEPT -m state --state ESTABLISHED,RELATED,NEW [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#LIBERA DNS SERVER PARA A REDE[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p udp --dport 53 -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 53 -j ACCEPT[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# LIBERA PORTA PARA CAMERA[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -j DNAT --to 192.168.0.191 -i eth0 -d 192.168.1.9 -p tcp --dport 7000[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -j ACCEPT -i eth0 -o eth1 -s 0/0 -d 192.168.1.191 -p tcp --dport 7000[/FONT][/COLOR]
     
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Bloqueio ultra-surf[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp -d 65.49.2.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp -d 65.49.14.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 19769 -j DROP[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]##PROTECOES[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Protege contra port scanners avan?ados (Ex.: nmap)[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A INPUT -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 20/m -j ACCEPT[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Bloqueando tracertroute[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A INPUT -p udp -s 0/0 -i eth0 --dport 33435:33525 -j DROP[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Protecoes contra ataques[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A INPUT -m state --state INVALID -j DROP[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#BARRANDO ACESSO AO NTOP PARA O MUNDO E LIBERANDO PARA REDE INTERNA[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3000 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 3000 -j ACCEPT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t filter -A INPUT -i eth1 -p tcp --dport 3000 -j ACCEPT[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#iMesh: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 216.35.208.0/24 -j DROP[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#Bloqueando os -:P2P:- (se voc? deseja utilizar um desses softwares, apenas retire o coment?rio # e substitua a condi??o de: REJECT, para ACCEPT) [/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 6881:6889 -j DNAT --to-dest 192.168.1.250[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp -i eth0 --dport 6881:6889 -d 192.168.1.250 -j DROP [/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#BearShare: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 6346 -j DROP [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#WinMX: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 209.61.186.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 64.49.201.0/24 -j DROP [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Napigator: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 209.25.178.0/24 -j DROP[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Morpheus: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 206.142.53.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 1214 -j DROP[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#KaZaA: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 213.248.112.0/24 -j DROP[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 1214 -j DROP [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Limewire: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -p tcp --dport 6346 -j DROP [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Audiogalaxy: [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -d 64.245.58.0/23 -j DROP [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]iptables -A FORWARD -m string --string "find_node" --algo bm -j DROP[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]Squid[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#squid.conf[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Autenticacao[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic children 5[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic credentialsttl 2 hours[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]authenticate_cache_garbage_interval 10 minutes[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]authenticate_ttl 10 minutes[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]authenticate_ip_ttl 0 seconds[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic realm Autenticador, Digite seu Login e Senha.[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic children 5[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]auth_param basic program /usr/lib/squid3/ncsa_auth /etc/shadow[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#http_port 3128 transparent[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_port 192.168.1.250:3128[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]visible_hostname atenas[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]error_directory /usr/share/squid3/errors/Portuguese[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#Diretorio do cache[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_dir aufs /var/cache/squid3 4096 16 256[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Log[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_access_log /var/log/squid3/access.log[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Porcentagem de atualizacao do cache -limpo ao atingir o maximo[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_swap_low 85[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_swap_high 90[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Memoria do cache[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]cache_mem 512 MB[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Usar o maximo de memoria possivel[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#memory_pools on[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#memory_pools_limit 2048 MB[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#Tamanho maximo de arquivos alocados na RAM[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]maximum_object_size_in_memory 2048 KB[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#Maximo e Minimo armazenados no disco[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]maximum_object_size 512 MB[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]minimum_object_size 0 KB[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]# Portas Liberadas[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl SSL_ports port 443[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl SSL_ports port 10000 # Webmin HTTPS[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 80 # http[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 21 # ftp[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 443 # https[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 70 # gopher[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 210 # wais[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 1025-65535 # unregistered ports[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 280 # http-mgmt[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 488 # gss-http[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 591 # filemaker[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 777 # multiling http[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 10000 # Webmin[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 3306 # Cartago[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 82 # conectividade digital[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 81 # conectividade digital[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 3443 # Sped receita federal[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 3337 # Sped[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl Safe_ports port 3338 # Sped[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny !Safe_ports[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# ACL PARA CONEXAO METODO SSL[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl CONNECT method CONNECT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny CONNECT !SSL_ports[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACLs PARA IP LIBERADO[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl ip_liberado src "/etc/squid3/ip_liberado"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access allow ip_liberado[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# ACLs PARA SITES LIBERADOS[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_liberados url_regex -i "/etc/squid3/sites_liberados"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access allow sites_liberados[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# ACLs PARA SITES BLOQUEADOS[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_bloqueados url_regex -i "/etc/squid3/bloqueados"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_bloqueados[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL PARA BLOQUEAR PROXY ANONIMO[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_proxy url_regex -i "etc/squid3/proxy"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_proxy[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL PARA BLOQUEIO DE SPYWARES[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_spywares url_regex -i "etc/squid3/spywares"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_spywares[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL PARA BLOQUEIO EM BLOG E CHAT[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_blogchat url_regex -i "/etc/squid3/blogchat"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_blogchat[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL PARA BLOQUEIO DE MUSICAS[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl sites_musicas url_regex -i "etc/squid3/musicas"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny sites_musicas[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#ACL STREAMING DE AUDIO E VIDEO[/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]acl streaming req_mime_type ^video/x-ms-asf [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl proibir_musica urlpath_regex -i .aif$ .aifc$ .aiff$ .asf$ .asx$ .avi$ .au$ .m3u$ .med$ .mp3$ .m1v$ .mp2$ .mp2v$ .mpa$ .mov$ .mpe$ .mpg$ .mpeg$ .ogg$ .pls$ .ram$ .ra$ .ram$ .snd$ .wma$ .wmv$ .wvx$ .mid$ .midi$ .rmi$ [/FONT][/COLOR]
     
    [COLOR=#333333][FONT=Helvetica Neue]http_access deny proibir_musica [/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]http_reply_access deny streaming[/FONT][/COLOR]
     
     
     
    [COLOR=#333333][FONT=Helvetica Neue]#CONTROLE DE BANDA[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl liberado src "/etc/squid3/liberado"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]acl limitado src "/etc/squid3/limitado"[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_pools 2[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_class 1 2[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_parameters 1 -1/-1 -1/-1[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_access 1 allow liberado[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_class 2 2[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_parameters 2 1280000/1280000 1280000/1280000[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]delay_access 2 allow limitado[/FONT][/COLOR]
     
     
    [COLOR=#333333][FONT=Helvetica Neue]# Politicas para rede local[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#http_access allow locanet[/FONT][/COLOR]
    [COLOR=#333333][FONT=Helvetica Neue]#http_access deny all[/FONT][/COLOR]

    Alguma sugestão ficaria agradecido.

    Cara vc precisa rever a situaçao básica, é se vai interceptar os pacotes que chegam ao roteador, e encaminha-los para o proxy (ai não seria transpartente?) e também quais as suas interfaces internas externas não apenas copie um script deste sem procurar entende-lo.