je viens de mettre en place un squid au taf pour limiter l'utilisation de la BP.
le but n'est pas de le mettre en place pour le WEB, mais pour les mises a jour debian (je commence a avoir un paquet de machine linux, et yan a une petite dixaine d'autres qui vont arriver)
ça semble fonctionner partiellement:
comme vous le voyez, j'ai 2 machines qui passent par le proxy (IP 192.168.1.60 et 192.168.1.241)1394544350.018 0 192.168.1.60 TCP_MEM_HIT/200 483 GET http://images.mesdiscussions.net/eco/icones/redface.gif - NONE/- image/gif
1394544350.158 0 192.168.1.60 TCP_MEM_HIT/200 13667 GET http://images.mesdiscussions.net/eco/im ... fievel.jpg - NONE/- image/jpeg
1394544350.177 0 192.168.1.60 TCP_MEM_HIT/200 482 GET http://images.mesdiscussions.net/eco/icones/wink.gif - NONE/- image/gif
1394544350.177 0 192.168.1.60 TCP_MEM_HIT/200 522 GET http://images.mesdiscussions.net/eco/icones/ohwell.gif - NONE/- image/gif
1394544350.178 0 192.168.1.60 TCP_MEM_HIT/200 793 GET http://images.mesdiscussions.net/eco/ic ... s/ange.gif - NONE/- image/gif
1394544350.182 0 192.168.1.60 TCP_MEM_HIT/200 4022 GET http://images.mesdiscussions.net/eco/im ... ulpito.jpg - NONE/- image/jpeg
1394544350.183 0 192.168.1.60 TCP_MEM_HIT/200 508 GET http://images.mesdiscussions.net/eco/ic ... /sweat.gif - NONE/- image/gif
1394544350.202 0 192.168.1.60 TCP_MEM_HIT/200 2081 GET http://images.mesdiscussions.net/eco/th ... pondre.gif - NONE/-
image/gif
1394544621.817 17 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 301 GET http://ftp.fr.debian.org/debian/dists/w ... elease.gpg - DIRECT/212.27.32.66 -
1394544621.836 15 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 301 GET http://ftp.fr.debian.org/debian/dists/w ... elease.gpg - DIRECT/212.27.32.66 -
1394544621.854 15 192.168.1.241 TCP_MISS/304 297 GET http://ftp.fr.debian.org/debian/dists/wheezy/Release - DIRECT/212.27.32.66 -
1394544621.882 16 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 303 GET http://ftp.fr.debian.org/debian/dists/w ... es/Release - DIRECT/212.27.32.66 -
1394544621.903 16 192.168.1.241 TCP_MISS/304 298 GET http://ftp.fr.debian.org/debian/dists/w ... ources.bz2 - DIRECT/212.27.32.66 -
1394544621.920 16 192.168.1.241 TCP_MISS/304 298 GET http://ftp.fr.debian.org/debian/dists/w ... ckages.bz2 - DIRECT/212.27.32.66 -
1394544621.939 16 192.168.1.241 TCP_MISS/304 297 GET http://ftp.fr.debian.org/debian/dists/w ... ion-fr.bz2 - DIRECT/212.27.32.66 -
1394544621.956 15 192.168.1.241 TCP_MISS/304 298 GET http://ftp.fr.debian.org/debian/dists/w ... ion-en.bz2 - DIRECT/212.27.32.66 -
1394544621.973 15 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 301 GET http://ftp.fr.debian.org/debian/dists/w ... ources.bz2 - DIRECT/212.27.32.66 -
1394544621.991 16 192.168.1.241 TCP_MISS/304 295 GET http://ftp.fr.debian.org/debian/dists/w ... diff/Index - DIRECT/212.27.32.66 -
1394544622.009 17 192.168.1.241 TCP_MISS/304 295 GET http://ftp.fr.debian.org/debian/dists/w ... diff/Index - DIRECT/212.27.32.66 -
1394544622.262 465 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 350 GET http://security.debian.org/dists/wheezy ... elease.gpg - DIRECT/128.101.240.212 -
1394544622.483 216 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 352 GET http://security.debian.org/dists/wheezy/updates/Release - DIRECT/128.101.240.212 -
1394544622.715 219 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 352 GET http://security.debian.org/dists/wheezy ... ources.bz2 - DIRECT/128.101.240.212 -
1394544622.924 205 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 352 GET http://security.debian.org/dists/wheezy ... ckages.bz2 - DIRECT/128.101.240.212 -
1394544623.145 221 192.168.1.241 TCP_REFRESH_UNMODIFIED/304 352 GET http://security.debian.org/dists/wheezy ... ion-en.bz2 - DIRECT/128.101.240.212 -
sur la machine 192.168.1.60, je fais de la navigation web (sur le FORUM comme vous pouvez le constater), la 192.168.1.241 est une machine linux sur laquelle j'ai fait un apt-get update
autant la navigation web a bien été recupérée du cache, autant l'update patitude est passé a travers !
je precise quand meme que j'ai bien fait 2 update a la suite l'un de l'autre puisque faut bien remplir le cache a un moement.
d'ailleurs, au premier passage ce sont des TCP_MISS qui apparaissent, alors que la j'ai du TCP_MISS et du TCP_REFRESH_UNMODIFIED, ce qui je pense signifie que il a quand meme verifié quelquechose dans le cache.
mais il les telecharge du net quand meme :/ (DIRECT en fin de ligne du code)
j'ai testé avec un fichier a 2 balles (http://proof.ovh.net/files/100Mio.dat), il le retelecharge a chaque fois.
la conf:
j'ai repris la conf de base que ne fait que proxy (et pas cache) et ait modifié en focntion des divers tuto trouvés sur le netacl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
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 CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow localnet
http_access deny all
http_port 3128
cache_mem 256 MB
cache_replacement_policy heap LFUDA
cache_dir ufs /var/squid_cache 1276786 16 256
maximum_object_size 200 MB
cache_store_log /var/log/squid3/store.log
coredump_dir /var/spool/squid3
cache allow all
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
refresh_pattern Packages\.bz2$ 0 20% 4320 refresh-ims
refresh_pattern Sources\.bz2$ 0 20% 4320 refresh-ims
refresh_pattern Release\.gpg$ 0 20% 4320 refresh-ims
refresh_pattern Release$ 0 20% 4320 refresh-ims
visible_hostname proxy.mydomain.local
vous auriez une idée ?
merci
