PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : squid und icap mit clamav



blubbersuelze
13.11.11, 03:42
Hallo zusammen,

ich habe vor squid3 mittels ICAP um einen Virenscanner zu erweitern.

Das System ist Debian Squeeze.

Squid3 mit Squidguard ohne ICAP funktioniert einwandfrei.

Nun wurde bei Squid3 Squidguard deaktiviert und ICAP aktiviert.
Squidguard wird dann von ICAP mit übernommen.

Die squid.conf wurde für ICAP um folgende Zeilen erweitert:
"
...
icap_enable on
icap_service service_req reqmod_precache 0 icap://127.0.0.1:1344/srv_squidclamav
adaptation_access service_req allow all
...
"

Der Dienst c-icap läuft ...

Die Datei c-icap.conf ist wie folgt konfiguriert:

"
PidFile /var/run/c-icap/c-icap.pid
CommandsSocket /var/run/c-icap/c-icap.ctl
Timeout 300
MaxKeepAliveRequests 100
KeepAliveTimeout 600
StartServers 3
MaxServers 10
MinSpareThreads 10
MaxSpareThreads 20
ThreadsPerChild 10
MaxRequestsPerChild 0
Port 1344
User c-icap
Group nogroup
ServerAdmin root@localhost
ServerName squidy
TmpDir /tmp
MaxMemObject 131072
DebugLevel 7
ModulesDir /usr/lib/c_icap
ServicesDir /usr/lib/c_icap
TemplateDir /usr/share/c_icap/templates/
TemplateDefaultLanguage en
LoadMagicFile /etc/c-icap/c-icap.magic
RemoteProxyUsers off
RemoteProxyUserHeader X-Authenticated-User
RemoteProxyUserHeaderEncoded on
ServerLog /var/log/c-icap/server.log
AccessLog /var/log/c-icap/access.log
Service echo srv_echo.so
"

die Datei /etc/c-icap/srv_squidclamav.conf sieht wie folgt aus:

"
maxsize 5000000
redirect http://192.168.1.1/virus_error.html
clamd_local /var/run/clamav/clamd.ctl
timeout 1
logredir 1
dnslookup 1
abortcontent ^video\/x-flv$
abortcontent ^video\/mp4$
abort ^.*\.swf$
abortcontent ^application\/x-shockwave-flash$
abortcontent ^.*application\/x-mms-framed.*$
whitelist .*\.clamav.net
squidguard /usr/bin/squidGuard -c /etc/squid3/squidGuard.conf
"


Die Services Squid, ICAP und clamd laufen und hören auch auf ihren Ports bzw. Sockets:

squidy:/etc/squid3# netstat -anp
Aktive Internetverbindungen (Server und stehende Verbindungen)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.98.44:8080 0.0.0.0:* LISTEN 1004/(squid)
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1161/sshd
tcp 0 0 0.0.0.0:1344 0.0.0.0:* LISTEN 861/c-icap
tcp6 0 0 :::22 :::* LISTEN 1162/sshd
udp 0 0 0.0.0.0:36796 0.0.0.0:* 1004/(squid)
udp 0 0 0.0.0.0:68 0.0.0.0:* 1005/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 1016/dhclient
udp 0 0 127.0.0.1:3401 0.0.0.0:* 1004/(squid)
udp 0 0 127.0.0.1:3401 0.0.0.0:* 1004/(squid)
udp6 0 0 :::58410 :::* 1004/(squid)
Aktive Sockets in der UNIX-Domäne (Server und stehende Verbindungen)
Proto RefCnt Flags Type State I-Node PID/Program name Pfad
unix 2 [ ACC ] STREAM HÃRT 4222 1277/clamd /var/run/clamav/clamd.ctl
unix 2 [ ACC ] STREAM HÃRT 3431 930/dbus-daemon /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM HÃRT 3394 863/acpid /var/run/acpid.socket
unix 2 [ ] DGRAM 2021 286/udevd @/org/kernel/udev/udevd
unix 7 [ ] DGRAM 3269 797/rsyslogd /dev/log
unix 2 [ ] DGRAM 4483 1406/0
unix 2 [ ] DGRAM 3561 998/squid3
unix 3 [ ] STREAM VERBUNDEN 3443 930/dbus-daemon
unix 3 [ ] STREAM VERBUNDEN 3442 930/dbus-daemon
unix 2 [ ] DGRAM 3428 1005/dhclient
unix 2 [ ] DGRAM 3408 1016/dhclient
unix 2 [ ] DGRAM 3381 863/acpid
unix 3 [ ] DGRAM 2026 286/udevd
unix 3 [ ] DGRAM 2025 286/udevd



Doch obwohl alle Dienste laufen bekommt der Browser von Squid zurück das etwas an der ICAP-Konfiguration nicht stimmen würde.
Google habe ich bemüht und nichts gefunden, was mir bei meinem Problem hilft.

Hoffentlich kann mir einer bei dem Problem helfen.

Danke

mfg. blubbersuelze :p