Newsgroup: it.comp.os.linux.iniziare
Titolo: squidGuard non filtra

Slackware 11
SquidGuard: 1.2.0 Sleepycat Software: Berkeley DB 3.3.11: (July 12,
2001)
Al momento il mio squidguard l'ho configurato senza blacklist in modo
da isolare il problema.
In pratica, solo per vedere se funziona o meno, io voglio fare in modo
che blocchi tutto.
E per provarlo lo testo in modo standalone, cioè non richiamato da
squid ma a command line.
squidGuard.conf
logdir /var/log/squid
acl {
        default {
            pass !any all
#            redirect 
http://www.google.it/
        }
}
sono certo che il file lo legge correttamente perchè se ci metto anche
i db lo segna sul log.
# echo "
http://www.libero.it/
 127.0.0.1 - - GET"|squidGuard -d
2006-11-03 13:21:43 [9897] squidGuard 1.2.0 started (1162556503.215)
2006-11-03 13:21:43 [9897] squidGuard ready for requests
(1162556503.215)
<---- blank line ---->
2006-11-03 13:21:43 [9897] squidGuard stopped (1162556503.215)
# echo $?
0
stesso risultato se decommento quel # redirect
stesso risultato se a pass gli metto "!any none" "all" "!all" "!all
none"
stesso risultato se faccio invece di libero prendo un qualsiasi altro
sito
stesso risultato se invece di 127.0.0.1 metto qualsiasi altra cosa
stesso risultato se invece di GET metto POST
idem se invece di echo | squidGuard metto squidGuard -d <test.block in
cui test.block contiene
http://www.libero.it/
 127.0.0.1 - - GET
ancora uguale se lo metto dentro squid.conf (redirect_program
/usr/bin/squidGuard)
che mi manca di provare?
da un strace mi sembra che sia tutto in ordine
# echo "
http://www.libero.it/
 127.0.0.1 - - GET"|strace squidGuard -d
execve("/usr/bin/squidGuard", ["squidGuard", "-d"], [/* 30 vars */]) =
0
uname({sys="Linux", node="intesys", ...}) = 0
brk(0)                                  = 0x805c4f0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=103295, ...}) = 0
mmap2(NULL, 103295, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3)                                = 0
open("/lib/
libdb-3.3.so
", O_RDONLY)     = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\22"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=604188, ...}) = 0
mmap2(NULL, 605292, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x40032000
mmap2(0x400c4000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x91) = 0x400c4000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PS\1\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1421670, ...}) = 0
mmap2(NULL, 1236276, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x400c6000
mmap2(0x401ee000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x127) = 0x401ee000
mmap2(0x401f2000, 7476, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401f2000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x401f4000
mprotect(0x401ee000, 4096, PROT_READ)   = 0
munmap(0x40018000, 103295)              = 0
gettimeofday({1162556892, 717017}, NULL) = 0
getpid()                                = 9945
brk(0)                                  = 0x805c4f0
brk(0x807d4f0)                          = 0x807d4f0
brk(0x807e000)                          = 0x807e000
open("/etc/squid/squidGuard.conf", O_RDONLY) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfff329c) = -1 ENOTTY
(Inappropriate ioctl for device)
fstat64(3, {st_mode=S_IFREG|0644, st_size=266, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40018000
read(3, "#\n# CONFIG FILE FOR SQUIDGUARD\n#"..., 8192) = 266
read(3, "", 4096)                       = 0
read(3, "", 8192)                       = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfff326c) = -1 ENOTTY
(Inappropriate ioctl for device)
close(3)                                = 0
munmap(0x40018000, 4096)                = 0
time(NULL)                              = 1162556892
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=951, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=951, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40018000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0"...,
4096) = 951
close(3)                                = 0
munmap(0x40018000, 4096)                = 0
write(2, "2006-11-03 13:28:12 [9945] squid"..., 692006-11-03 13:28:12
[9945] squidGuard 1.2.0 started (1162556892.717)) = 69
rt_sigaction(SIGHUP, {0x804aab0, [], SA_RESTORER|SA_RESTART|SA_NOMASK,
0x400ef958}, NULL, 8) = 0
gettimeofday({1162556892, 718166}, NULL) = 0
time(NULL)                              = 1162556892
write(2, "2006-11-03 13:28:12 [9945] squid"..., 742006-11-03 13:28:12
[9945] squidGuard ready for requests (1162556892.718)) = 74
fstat64(0, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40018000
read(0, "
http://www.libero.it/
 127.0.0.1 "..., 4096) = 40
fstat64(1, {st_mode=S_IFCHR|0720, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40019000
write(1, "\n", 1)                       = 1
read(0, "", 4096)                       = 0
gettimeofday({1162556892, 718627}, NULL) = 0
time(NULL)                              = 1162556892
write(2, "2006-11-03 13:28:12 [9945] squid"..., 632006-11-03 13:28:12
[9945] squidGuard stopped (1162556892.718)) = 63
munmap(0x40019000, 4096)                = 0
exit_group(0)                           = ?
Process 9945 detached
Matteo

> Slackware 11
pardon, non slackware 11 ma current del 24/04/06