Galera estou com um problema aqui com esses dois, configurei o
squidGuard todo direitinho e tal, mas quando eu coloco a seguinte opcão
no meu squidGuard.conf :
src diretoria {
iplist /etc/squid/diretoria.txt #IPS da diretoria
}
time afterwork {
weekly * 12:00 - 14:00 # Libera do meio-dia as 2 da tarde
weekly * 18:00 - 24:00 # Libera de 6 da tarde a meia-noite
weekly * 00:00 - 08:00 # Libera da meia-noite as 8 da manhã
weekly saturdays * # Sábado livre
weekly sundays * # Domingo livre
}
acl {
#Diretoria passa tudo menos porno e adulto
diretoria {
pass !in-addr !porn !adult all
}
#Se tiver dentro de "afterwork" libera tudo menos porno e adulto
default within afterwork {
pass !in-addr !porn !adult all
# Se estiver no horário de expediente bloqueia geral com excessão da
whitelist
} else {
pass !in-addr whitelist !ads !adult !antispyware
!astrology !artnudes !beerliquorinfo !sexuality !games !onlinegames
!virusinfected !shopping !culinary !blog !chat !naturism !aggressive
!audio-video !drugs !gambling !hacking !mail !phishing !porn !proxy
!spyware !violence !warez !guns !reaffected !entertainment !cleaning
!banking !socialnetworking !onlineauctions !kidstimewasting !ecommerce
!radio !government !childcare !news !jobsearch !gardening !verisign
!jewelry !dialers !cellphones !instantmessaging !mobile-phone
!marketingware !filehosting !clothing !religion !onlinepayment
!searchengines !ringtones !desktopsillies !vacation !sports
!personalfinance !updatesites !mixed_adult !dating !weapons
!beerliquorsale !financial !homerepair !medical !weather
!frencheducation !hygiene !pets !webmail !sect all
redirect http://localhost/deny.html
}
}
Quando eu reinicio o squid ele dá esse erro:
2007/11/18 11:37:01| Starting Squid Cache version 2.6.STABLE5 for
i386-debian-linux-gnu...
2007/11/18 11:37:01| Process ID 30900
2007/11/18 11:37:01| With 1024 file descriptors available
2007/11/18 11:37:01| Using epoll for the IO loop
2007/11/18 11:37:01| DNS Socket created at 0.0.0.0, port 38405, FD 6
2007/11/18 11:37:01| Adding domain cabonatal.com.br from /etc/resolv.conf
2007/11/18 11:37:01| Adding nameserver 201.76.155.68 from /etc/resolv.conf
2007/11/18 11:37:01| helperOpenServers: Starting 5 'squidGuard' processes
2007/11/18 11:37:01| User-Agent logging is disabled.
2007/11/18 11:37:01| Referer logging is disabled.
2007/11/18 11:37:01| Unlinkd pipe opened on FD 16
2007/11/18 11:37:01| Swap maxSize 102400 KB, estimated 7876 objects
2007/11/18 11:37:01| Target number of buckets: 393
2007/11/18 11:37:01| Using 8192 Store buckets
2007/11/18 11:37:01| Max Mem size: 8192 KB
2007/11/18 11:37:01| Max Swap size: 102400 KB
2007/11/18 11:37:01| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2007/11/18 11:37:01| Rebuilding storage in /var/spool/squid (DIRTY)
2007/11/18 11:37:01| Using Least Load store dir selection
2007/11/18 11:37:01| Set Current Directory to /var/spool/squid
2007/11/18 11:37:01| Loaded Icons.
2007/11/18 11:37:01| Accepting transparently proxied HTTP connections at
0.0.0.0, port 3128, FD 18.
2007/11/18 11:37:01| Accepting ICP messages at 0.0.0.0, port 3130, FD 19.
2007/11/18 11:37:01| HTCP Disabled.
2007/11/18 11:37:01| WCCP Disabled.
2007/11/18 11:37:01| Ready to serve requests.
2007/11/18 11:37:01| WARNING: url_rewriter #2 (FD 8) exited
2007/11/18 11:37:01| WARNING: url_rewriter #3 (FD 9) exited
2007/11/18 11:37:01| WARNING: url_rewriter #4 (FD 10) exited
2007/11/18 11:37:01| Too few url_rewriter processes are running
FATAL: The url_rewriter helpers are crashing too rapidly, need help!
Squid Cache (Version 2.6.STABLE5): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.012 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
total space in arena: 2376 KB
Ordinary blocks: 2286 KB 4 blks
Small blocks: 0 KB 0 blks
Holding blocks: 240 KB 1 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 89 KB
Total in use: 2526 KB 97%
Total free: 89 KB 3%
Se eu tirar a opcão time do squidGuard.conf e reiniciar o squid, o erro
url_rewriter some, o squid funciona beleza e o squidGuard filtra as
páginas, segue log:
2007/11/18 11:39:50| Starting Squid Cache version 2.6.STABLE5 for
i386-debian-linux-gnu...
2007/11/18 11:39:50| Process ID 31083
2007/11/18 11:39:50| With 1024 file descriptors available
2007/11/18 11:39:50| Using epoll for the IO loop
2007/11/18 11:39:50| DNS Socket created at 0.0.0.0, port 38468, FD 6
2007/11/18 11:39:50| Adding domain cabonatal.com.br from /etc/resolv.conf
2007/11/18 11:39:50| Adding nameserver 201.76.155.68 from /etc/resolv.conf
2007/11/18 11:39:50| helperOpenServers: Starting 5 'squidGuard' processes
2007/11/18 11:39:50| User-Agent logging is disabled.
2007/11/18 11:39:50| Referer logging is disabled.
2007/11/18 11:39:50| Unlinkd pipe opened on FD 16
2007/11/18 11:39:50| Swap maxSize 102400 KB, estimated 7876 objects
2007/11/18 11:39:50| Target number of buckets: 393
2007/11/18 11:39:50| Using 8192 Store buckets
2007/11/18 11:39:50| Max Mem size: 8192 KB
2007/11/18 11:39:50| Max Swap size: 102400 KB
2007/11/18 11:39:50| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2007/11/18 11:39:50| Rebuilding storage in /var/spool/squid (DIRTY)
2007/11/18 11:39:50| Using Least Load store dir selection
2007/11/18 11:39:50| Set Current Directory to /var/spool/squid
2007/11/18 11:39:50| Loaded Icons.
2007/11/18 11:39:50| Accepting transparently proxied HTTP connections at
0.0.0.0, port 3128, FD 18.
2007/11/18 11:39:50| Accepting ICP messages at 0.0.0.0, port 3130, FD 19.
2007/11/18 11:39:50| HTCP Disabled.
2007/11/18 11:39:50| WCCP Disabled.
2007/11/18 11:39:50| Ready to serve requests.
2007/11/18 11:39:50| Store rebuilding is 53.8% complete
2007/11/18 11:39:50| Done reading /var/spool/squid swaplog (7614 entries)
2007/11/18 11:39:50| Finished rebuilding storage from disk.
2007/11/18 11:39:50| 7614 Entries scanned
2007/11/18 11:39:50| 0 Invalid entries.
2007/11/18 11:39:50| 0 With invalid flags.
2007/11/18 11:39:50| 7614 Objects loaded.
2007/11/18 11:39:50| 0 Objects expired.
2007/11/18 11:39:50| 0 Objects cancelled.
2007/11/18 11:39:50| 0 Duplicate URLs purged.
2007/11/18 11:39:50| 0 Swapfile clashes avoided.
2007/11/18 11:39:50| Took 0.3 seconds (24725.3 objects/sec).
2007/11/18 11:39:50| Beginning Validation Procedure
2007/11/18 11:39:50| Completed Validation Procedure
2007/11/18 11:39:50| Validated 7614 Entries
2007/11/18 11:39:50| store_swap_size = 92156k
2007/11/18 11:39:51| storeLateRelease: released 0 objects
Só que estou precisando da filtragem por tempo e dias da semana, estou
seguindo a conf do http://www.squidguard.org/Doc/extended.html#times ,
acho que deve ser alguma coisa no squid.conf , se alguém já passou por
isso ou se alguém usa essa dupla e poder me ajudar fico agradecido.
Valeu