Bonjour,
J'essaie de mettre en place un système de filtrage en passant par squid squidguard mais j'ai quelques soucis. Les flux sont bien renvoyés vers squid qui filtre mais il ne filtre pas tout, si je prends une des premières adresses de squidguard/db/adult/domains elle va être bloquée, en revanche les sites les plus connut ou trouvables sur google passent sans problème. La liste est pourtant à jours (liste de Toulouse et j'ai tenté celle de shalla aussi, même résultat).
squidGuard -u :
Code :
- 2017-11-28 12:02:50 [11991] squidGuard: can't write to logfile /var/log/squidguard/squidGuard.log
- 2017-11-28 12:02:50 [11991] squidGuard: FATAL: can't open configfile /etc/squidguard/squidGuard.conf
- 2017-11-28 12:02:50 [11991] ERROR: Going into emergency mode
|
ls -la /var/log/squidguard :
Code :
- drwxr-xr-x 2 proxy proxy 4096 nov. 27 20:38 .
- drwxrwxr-x 14 root syslog 4096 nov. 27 18:01 ..
- -rw-r----- 1 proxy proxy 42734 nov. 27 17:36 squidGuard.log
|
ls -la /etc/squidguard :
Code :
- drwxr-xr-x 2 proxy proxy 4096 nov. 27 20:14 .
- drwxr-xr-x 132 root root 12288 nov. 27 18:15 ..
- -rw-r--r-- 1 proxy proxy 1817 août 24 21:04 errorpage.css
- -rw-r--r-- 1 proxy proxy 1024 nov. 27 19:09 squid.conf
- -rw-r--r-- 1 proxy proxy 290586 août 24 21:04 squid.conf.old
|
squid -z :
Code :
- 2017/11/28 12:04:35| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
- 2017/11/28 12:04:35| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
- 2017/11/28 12:04:35| WARNING: For now we will assume you meant to write /32
- 2017/11/28 12:04:35| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
- 2017/11/28 12:04:35| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
- 2017/11/28 12:04:35| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
- 2017/11/28 12:04:35| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
- 2017/11/28 12:04:35| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
- 2017/11/28 12:04:35| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
- 2017/11/28 12:04:35| ALERT: setgid: (1) Operation not permitted
- WARNING: Cannot write log file: /var/log/squid/cache.log
- /var/log/squid/cache.log: Permission denied
- messages will be sent to 'stderr'.
- 2017/11/28 12:04:35| ALERT: setgid: (1) Operation not permitted
- 2017/11/28 12:04:35| ALERT: setgid: (1) Operation not permitted
- 2017/11/28 12:04:35| storeDirWriteCleanLogs: Starting...
- 2017/11/28 12:04:35| Finished. Wrote 0 entries.
- 2017/11/28 12:04:35| Took 0.00 seconds ( 0.00 entries/sec).
- FATAL: Ipc::Mem::Segment::create failed to shm_open(/squid-cf__metadata.shm): (17) File exists
- Squid Cache (Version 3.5.23): Terminated abnormally.
- CPU Usage: 0.006 seconds = 0.000 user + 0.006 sys
- Maximum Resident Size: 46288 KB
- Page faults with physical i/o: 6
|
/etc/squidguard/squidGuard.conf :
Code :
- dbhome /var/lib/squidguard/db
- logdir /var/log/squidguard
- dest adult {
- domainlist adult/domains
- urllist adult/urls
- }
- dest agressif {
- domainlist agressif/domains
- urllist agressif/urls
- }
- dest sect {
- domainlist sect/domains
- urllist sect/urls
- }
- acl {
- default {
- pass !adult !agressif !sect all
- redirect http://www.ovh.com/fr/images/hosti [...] terdit.jpg
- }
- }
|
/etc/squid/squid.conf :
Code :
- cache_effective_user proxy
- cache_effective_group proxy
- visible_hostname none
- http_port 3128 transparent
- acl manager proto cache_object
- acl localhost src 127.0.0.1/255.255.255.255
- acl serveur src 192.168.0.1
- acl poste src 192.168.0.50
- acl multipostes src 192.168.0.100-192.168.0.125
- acl SSL_ports port 443 563
- acl Safe_ports port 80 # http
- acl Safe_ports port 20 # ftp-data
- acl Safe_ports port 21 # ftp
- acl Safe_ports port 443 563 # ssl
- 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
- http_access allow all
- url_rewrite_program /usr/bin/squidGuard -c /etc/squidguard/squidGuard.conf
- url_rewrite_children 10
|
Avant ça j'ai eu une erreur : "can't open db/adult/domain, emergencey mode" lorsque je lançais squidGuard -u, pourtant il y avait les bons droits je pense :
sudo ls -la /var/lib/squidguard/db/adult :
Code :
- drwxrws--- 2 proxy proxy 4096 nov. 27 20:30 .
- drwxrws--- 5 proxy proxy 4096 nov. 27 18:49 ..
- -rwxrwx--- 1 proxy proxy 48594511 nov. 27 19:55 domains
- -rwxrwx--- 1 proxy proxy 107028480 nov. 27 20:35 domains.db
- -rwxrwx--- 1 proxy proxy 0 oct. 18 2005 expressions
- -rwxrwx--- 1 proxy proxy 2904627 nov. 26 22:40 urls
- -rwxrwx--- 1 proxy proxy 6520832 nov. 27 20:35 urls.db
- -rwxrwx--- 1 proxy proxy 17 oct. 18 2005 usage
|
Qui a été résolu par la commande : /usr/sbin/update-squidguard
Je suis un peu perdu, si l'un d'entre vous pouvait m'aider se serait avec joie.
Merci d'avance.
Message édité par fr_maru le 28-11-2017 à 19:51:16