Bon bas voila j’ai refais ma conf :
squid.conf :
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
http_port 3128 transparent
# Taille maximum de méire vive utilisépour stocker du cache
cache_mem 16 MB
# Taille maximum des objets stockédans le cache
maximum_object_size 15 MB
# Chemin des fichiers de cache
cache_dir ufs /var/spool/squid 200 16 256
# Format des logs :
# -> Avec off, squid utilise son propre format de logs,
# mais la date et l'heure ne sont pas lisibles.
# -> Avec on, squid utilise le format standard CLF
emulate_httpd_log off
# Ces deux lignes permettent d'intéer le plugin SquidGuard
redirect_program /usr/bin/squidGuard
redirect_children 4
# Pas d'infos sur ces lignes
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# ACL qui dénit le réau utilisant le cache
acl eth1 src 10.0.0.0/255.255.255.0
# Liste des acl par déut -> A conserver
#acl all src 10.0.0.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
#acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 22 # ssh
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 1863 # msn
#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 Safe_ports port 631 # cups
#acl Safe_ports port 873 # rsync
#acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
# Accèfournis par squid
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
#donne accèau proxy à on réau
http_access allow eth1
http_access allow localhost
# Interdit tout le reste
http_access deny all
# Autorise les rénses pour tout le monde (par déut)
http_reply_access allow all
# Autorise le protocole icp pour tout le monde (par déut)
icp_access allow all
coredump_dir /var/spool/squid
# pour le proxy transparent
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on
#httpd_accel_host virtual
#httpd_accel_port 80
dns_nameservers 80.10.246.2 80.10.246.129
# on active le SNMP sur squid pour les stats mrtg :)
#acl snmppublic snmp_community public
#snmp_port 3401
#snmp_access allow snmppublic all
visible_hostname ProxyServer
cache_mgr admin@localhost
SquidGuard.conf :
#----------------------------------------------------------------
# SquidGuard CONFIGURATION FILE
#----------------------------------------------------------------
#Ici on dénit les rértoires oùtrouvent les blacklists et le rértoire des logs
# CONFIGURATION DIRECTORIES
dbhome /var/lib/squidguard/db
logdir /var/log/squid
#On dénit en ensuite les groupes de listes contenant
# * les domains (domainlist) soit donc les domaines interdits.
# * la liste des urls (urllist) soit donc les URL interdites.
# * la liste des expressions (expressionlist) soit les expressions interdites contenuent dans une page WEB.
#L'option log /var/log/squid/nom_du_fichier.log permet de gérer un log lorsqu'une redirection est effectué
dest redirector {
domainlist redirector/domains
urllist redirector/urls
expressionlist redirector/expressions
}
dest adult {
domainlist adult/domains
urllist adult/urls
}
#dest warez {
# domainlist warez/domains
# urllist warez/urls
#}
#dest ads {
# domainlist ads/domains
# urllist ads/urls
#}
#dest aggressive {
# domainlist aggressive/domains
# urllist aggressive/urls
#}
#dest drugs {
# domainlist drugs/domains
# urllist drugs/urls
#}
#dest gambling {
# domainlist gambling/domains
# urllist gambling/urls
# log /var/log/squid/jeux.log
#}
#dest violence {
# domainlist violence/domains
# urllist violence/urls
# expressionlist violence/expressions
#}
#Vous pouvez ensuite dénir des groupes
source LAN {
ip 10.0.0.0/255.255.255.0
}
#On dénit ensuite les droits pour chaque groupe et la page vers laquelle ils seront redirigé
#L'option pass !groupe_de_listes permet de donner l'accèsi cela ne correspond pas aux listes interdites
#et l'adresse de la page vers laquelle ils sont redirigé
#Vous devez avoir un serveur HTTP installépar déut, la page fournie par SquidGuard (voici son emplacement : /usr/share/doc/squidguard/examples/squidGuard.cgi.gz) est en cgi, vous devez la copier dans le ssier cgi (par déut sur apache /usr/lib/cgi-bin/ ) et activer le cgi sur votre serveur HTTP.
# ACLs
acl {
LAN {
pass !adult
redirect http://127.0.0.1/cgi-bin/squidGuard.cgi?clientaddr=%a&srcclass=%s&targetclass=%t&url=%u&lang=fr
}
Default
redirect http://127.0.0.1/cgi-bin/squidGuard.cgi?clientaddr=%a&srcclass=%s&targetclass=%t&url=%u
pass none
}
}
Voila c’est propre, beau mais ça marche pas…
cat /var/log/syslog :
The redirector helpers are crashing too rapidly, need help!
Oct 5 11:55:53 Serveur squid[9396]: Squid Parent: child process 9398 exited with status 1
Oct 5 11:55:56 Serveur squid[9396]: Squid Parent: child process 9411 started
Oct 5 11:55:57 Serveur (squid): The redirector helpers are crashing too rapidly, need help!
Oct 5 11:55:57 Serveur squid[9396]: Squid Parent: child process 9411 exited with status 1
Oct 5 11:56:00 Serveur squid[9396]: Squid Parent: child process 9420 started
Oct 5 11:56:00 Serveur (squid): The redirector helpers are crashing too rapidly, need help!
Oct 5 11:56:00 Serveur squid[9396]: Squid Parent: child process 9420 exited with status 1
Oct 5 11:56:03 Serveur squid[9396]: Squid Parent: child process 9429 started
Oct 5 11:56:04 Serveur (squid): The redirector helpers are crashing too rapidly, need help!
Oct 5 11:56:04 Serveur squid[9396]: Squid Parent: child process 9429 exited with status 1
Oct 5 11:56:07 Serveur squid[9396]: Squid Parent: child process 9437 started
Oct 5 11:56:08 Serveur (squid): The redirector helpers are crashing too rapidly, need help!
Oct 5 11:56:08 Serveur squid[9396]: Squid Parent: child process 9437 exited with status 1
Oct 5 11:56:08 Serveur squid[9396]: Exiting due to repeated, frequent failures
fab