Hello everyone,<br><br>I'm using Patch cttproxy-2.6.18-2.0.6 + Squid 2.6-5 + Iptables 3.6.0 + Kernel 2.6.18-6. + Thundercache 2.1<br><br>I've based my experience on <a href="http://web.suffieldacademy.org/ils/netadmin/docs/software/squid/#toc11">http://web.suffieldacademy.org/ils/netadmin/docs/software/squid/#toc11</a><br>
<br>The whole thing is working very well, I can cache videos from youtube and most of the video websites. The clients do everything on the internet with their own IP adresses.<br>BUT, my squid cache is not working properly. It caches everything but when we try to use the cache it doesn't work.<br>
<br>Please, check my squid.conf:<br><br><i>http_port 3128 tproxy transparent<br>visible_hostname proxy<br><br>cache_mem 20 MB<br>maximum_object_size_in_memory 5 MB<br>maximum_object_size 600 MB<br>minimum_object_size 0 KB<br>
cache_swap_low 90<br>cache_swap_high 95<br>cache_dir ufs /cache01/squid 2048 16 256<br>cache_access_log /var/log/squid/access.log<br>refresh_pattern ^ftp: 15 20% 2280<br>refresh_pattern ^gopher: 15 0% 2280<br>refresh_pattern . 15 20% 2280<br>
<br>acl all src <a href="http://0.0.0.0/0.0.0.0">0.0.0.0/0.0.0.0</a><br>acl manager proto cache_object<br>acl localhost src <a href="http://127.0.0.1/255.255.255.255">127.0.0.1/255.255.255.255</a><br>acl SSL_ports port 443 563<br>
acl Safe_ports port 21 80 443 563 70 210 280 488 59 777 901 1025-65535<br>acl purge method PURGE<br>acl CONNECT method CONNECT<br><br>http_access allow manager localhost<br>http_access deny manager<br>http_access allow purge localhost<br>
http_access deny purge<br>http_access deny !Safe_ports<br>http_access deny CONNECT !SSL_ports<br><br>acl redelocal src xxx.xxx.xxx..0/24<br>acl externo src xxx.xxx.xxx.xxx<br>http_access allow externo<br>http_access allow localhost<br>
http_access allow redelocal<br>http_access deny all<br>acl local1 src xxx.xxx.xxx.0/24<br> <br>
tcp_outgoing_address ip_squid local1<br><br><br>url_rewrite_children 200<br>acl store_rewrite_list url_regex -i "/etc/squid/thunder.lst"<br>url_rewrite_access allow store_rewrite_list<br>url_rewrite_access deny all<br>
url_rewrite_program /etc/squid/loader.php<br><br><br>#url_rewrite_access allow store_rewrite_list<br>#url_rewrite_access deny all<br>#url_rewrite_program /etc/squid/loader.php<br><br>#nega cache local, para não haver duplicação<br>
acl localcache dstdomain ip_squid<br>cache deny localcache<br><br>#Bloquear ICP e HTCP - Usado para conversar com outros caches Hierarquicamente<br>icp_port 0<br>htcp_port 0<br>icp_access deny all<br>htcp_access deny all<br>
#Desabilitar SNMP<br>snmp_port 0<br>snmp_access deny all<br><br>cache_effective_user proxy<br>cache_effective_group proxy<br><br>#Extras<br>detect_broken_pconn on<br><br><br>pipeline_prefetch on<br>~ </i><br>
<br>--------------------------------------------------------------------------------------------------------------------------------<br><br>Iptables Rule:<br><br>iptables -t tproxy -A PREROUTING -p tcp -m tcp --dport 80 -j TPROXY --on-port 3128<br>
<pre><br><br></pre><br><br>