<html><div style='background-color:'><P>hola listeros estoy algo confundido la verdad no se que hacer por mas que trato no puedo hechar a andar mi squid en forma transparente ya intente de todo incluso cambie el sistema operativo (de fc4 a debian kernel 2.6.8-2-386)<BR> pero es igual no me funciona  alguien que le pueda hechar un vistaso a mi squid.conf y a mi iptables que me pueda decir donde esta mi error.</P>
<P>he intentado varios scripts para el iptables por que yo creo que ahi esta mi error pero la verda ya no se que pueda ser espero alguien me pueda hechar una mano o si no pues que me pueda mandar su iptables que le funciona</P>
<P>les paso las configuraciones que yo tengo </P>
<P>eth0= lan mi red</P>
<P>eth1=megared mi internet</P>
<P>mi configuracion de red esta asi</P>
<P>ip 10.30.106.x</P>
<P>subred 255.255.255.0</P>
<P>------------------------------------------------------------------------------------------------------------------------------------</P>
<P>mi squid. conf</P>
<P>--------------------------------------------------------------------------------------------------------------------------------------</P>
<P>http_port 3128<BR>icp_port 3130<BR>acl QUERY urlpath_regex cgi-bin \?<BR>no_cache deny QUERY<BR>cache_mem 32 MB<BR>cache_swap_low 90<BR>cache_swap_high 95<BR>maximum_object_size 4096 KB<BR>cache_dir ufs /var/spool/squid 1800 16 256<BR>ftp_user <A href="mailto:francisco@jimenezautomotriz.com">francisco@jimenezautomotriz.com</A><BR>ftp_passive on<BR>refresh_pattern ^ftp:           1440    20%     10080<BR>refresh_pattern ^gopher:        1440    0%      1440<BR>refresh_pattern .               0       20%     4320<BR>acl all src 0.0.0.0/0.0.0.0<BR>acl manager proto cache_object<BR>acl localhost src 
127.0.0.1/255.255.255.255<BR>acl to_localhost dst 127.0.0.0/8<BR>acl SSL_ports port 443 563<BR>acl Safe_ports port 80          # http<BR>acl Safe_ports port 21          # ftp<BR>acl Safe_ports port 443 563     # https, snews<BR>acl Safe_ports port 70          # gopher<BR>acl Safe_ports port 210         # wais<BR>acl Safe_ports port 1025-65535  # unregistered ports<BR>acl Safe_ports port 280         # http-mgmt<BR>acl Safe_ports port 488         # gss-http<BR>acl Safe_ports port 591         # filemaker<BR>acl Safe_ports port 
777         # multiling http<BR>acl CONNECT method CONNECT<BR>acl denegarurl url_regex -i \.mp3$ \.avi$ \.mpg$ \.wma$ \.exe$ \.vbs$ \.bat$ \.lnk$ \.scr$ \.pif$ \.msi$<BR>acl privilegiados src "/etc/squid/privilegiados"<BR>acl prohibidas url_regex "/etc/squid/prohibidas"<BR>acl unico time SMTWHFA 08:00-21:30<BR>acl resto src "/etc/squid/resto"<BR>acl superR src "/etc/squid/superR"<BR>acl sprohibidas url_regex "/etc/squid/sprohibidas"<BR>http_access allow manager localhost<BR>http_access deny manager<BR>http_access deny !Safe_ports<BR>http_access deny CONNECT !SSL_ports<BR>http_access allow localhost<BR>http_access allow privilegiados<BR>http_access deny denegarurl<BR>http_access deny prohibidas<BR>http_access allow resto<BR>http_access deny sprohibidas<BR>http_access allow superR<BR>http_access deny all<BR>http_reply_access allow all<BR>icp_access 
allow all<BR>httpd_accel_host virtual<BR>httpd_accel_port 80<BR>httpd_accel_with_proxy on<BR>httpd_accel_uses_host_header on<BR><BR>--------------------------------------------------------------------------------------------------------------------------------------</P>
<P>mis reglas de iptables</P>
<P>-------------------------------------------------------------------------------------------------------------------------------------</P>
<P>#!/bin/sh<BR>## SCRIPT de IPTABLES - ejemplo del manual de iptables<BR>## Ejemplo de script para firewall entre red-local e internet<BR>##<BR>## Pello Xabier Altadill Izura<BR>## <A href="http://www.pello.info">www.pello.info</A> - <A href="mailto:pello@pello.info">pello@pello.info</A></P>
<P>echo -n Aplicando Reglas de Firewall...</P>
<P>## FLUSH de reglas<BR>iptables -F<BR>iptables -X<BR>iptables -Z<BR>iptables -t nat -F</P>
<P>## Establecemos politica por defecto<BR>iptables -P INPUT ACCEPT<BR>iptables -P OUTPUT ACCEPT<BR>iptables -P FORWARD ACCEPT<BR>iptables -t nat -P PREROUTING ACCEPT<BR>iptables -t nat -P POSTROUTING ACCEPT</P>
<P>## Empezamos a filtrar<BR>## Nota: eth0 es el interfaz conectado al router y eth1 a la LAN<BR># El localhost se deja (por ejemplo conexiones locales a mysql)<BR>/sbin/iptables -A INPUT -i lo -j ACCEPT</P>
<P># Al firewall tenemos acceso desde la red local<BR>iptables -A INPUT -s 0.0.0.0/0 -i eth0 -j ACCEPT</P>
<P># Ahora hacemos enmascaramiento de la red local<BR># y activamos el BIT DE FORWARDING (imprescindible!!!!!)<BR>iptables -t nat -A POSTROUTING -s 0.0.0.0/0 -o eth1 -j MASQUERADE</P>
<P># Con esto permitimos hacer forward de paquetes en el firewall, o sea<BR># que otras máquinas puedan salir a traves del firewall.<BR>echo 1 > /proc/sys/net/ipv4/ip_forward</P>
<P>## Y ahora cerramos los accesos indeseados del exterior:<BR># Nota: 0.0.0.0/0 significa: cualquier red</P>
<P># Cerramos el rango de puerto bien conocido<BR>#iptables -A INPUT -s 0.0.0.0/0 -p tcp -dport 1:1024 -j DROP<BR>#iptables -A INPUT -s 0.0.0.0/0 -p udp -dport 1:1024 -j DROP<BR>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128<BR># Cerramos un puerto de gestión: webmin<BR>#iptables -A INPUT -s 0.0.0.0/0 -p tcp -dport 10000 -j DROP</P>
<P>echo " OK . Verifique que lo que se aplica con: iptables -L -n"<BR></P>
<P><BR><BR> </P>
<DIV>
<P align=center><FONT face="Lucida Handwriting" color=#6699ff size=4><STRONG>-·=»‡«=·-ƒ®åñ¢¦§¢0  ¡åv¦ë®  §.-·=»‡«=·-</STRONG></FONT></P></DIV></div></html>