Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: Linux Forum Linux-Web.de. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

DarkNova

Fortgeschrittener

  • »DarkNova« ist männlich
  • »DarkNova« ist der Autor dieses Themas

Beiträge: 520

Wohnort: Bayern

Beruf: Energieelektroniker

  • Nachricht senden

1

06.09.2005, 12:38

SCAVR und Squid

hallo,

Ich versuche zur Zeit den Squid cache mit Hilfe von SquidClamAV_Redirector und ClamAV auf Viren überprüfen zu lassen. Clam AV läuft ohne Probleme. Ich habe SCAVR nach der dieser Anleitung installiert. Ich habe SCAVR daraufhin getestet wie es im howto beschrieben wurde:

#/usr/local/bin/SquidClamAV_Redirector.py -c /etc/squid/SquidClamAV_Redirector.conf
http://freshmeat.net FOO FOO BAR
STRG+D

In der /var/log/squid/SquidClamAV_Redirector.log steht darauf folgendes:

Sep 6 11:46:05 localhost SquidClamAV: Url: http://freshmeat.net/ Status OKAY


Wenn ich dann Squid in betrieb nehme und eine Seite im Browser aufrufe dann steht in der /var/log/squid/cache.log das:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:06:50| WARNING: redirector #2 (FD 15) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:06:51| WARNING: redirector #3 (FD 16) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:06:52| WARNING: redirector #4 (FD 24) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:06:52| WARNING: redirector #5 (FD 25) exited
2005/09/06 12:06:52| Too few redirector processes are running
2005/09/06 12:06:52| Starting new helpers
2005/09/06 12:06:52| helperOpenServers: Starting 10 'SquidClamAV_Redirector.py' processes
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:06:57| WARNING: redirector #6 (FD 26) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:06:57| WARNING: redirector #8 (FD 28) exited
2005/09/06 12:06:57| WARNING: redirector #9 (FD 35) exited
2005/09/06 12:06:57| WARNING: redirector #7 (FD 27) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:06:58| WARNING: redirector #10 (FD 36) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:07:04| WARNING: redirector #1 (FD 29) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:07:04| WARNING: redirector #4 (FD 32) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:07:04| WARNING: redirector #3 (FD 31) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:07:04| WARNING: redirector #2 (FD 30) exited
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:07:05| WARNING: redirector #6 (FD 34) exited
2005/09/06 12:07:05| Too few redirector processes are running
2005/09/06 12:07:05| storeDirWriteCleanLogs: Starting...
2005/09/06 12:07:05| WARNING: Closing open FD   22
2005/09/06 12:07:05|   Finished.  Wrote 1035 entries.
2005/09/06 12:07:05|   Took 0.0 seconds (918367.3 entries/sec).
FATAL: The redirector helpers are crashing too rapidly, need help!

Squid Cache (Version 2.5.STABLE9): Terminated abnormally.
CPU Usage: 0.236 seconds = 0.069 user + 0.167 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 4
Memory usage for squid via mallinfo():
        total space in arena:    2496 KB
        Ordinary blocks:         2366 KB      6 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:           204 KB      1 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:     129 KB
        Total in use:            2570 KB 103%
        Total free:               129 KB 5%
Traceback (most recent call last):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 574, in ?
    redirector.run()
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 481, in run
    if self.get_file(url):
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 293, in get_file
    if not self.match_extension():
  File "/usr/local/bin/SquidClamAV_Redirector.py", line 379, in match_extension
    if 'all' in self.extensions:
AttributeError: 'SquidClamAV_Redirector' object has no attribute 'extensions'
2005/09/06 12:07:08| Starting Squid Cache version 2.5.STABLE9 for i386-debian-linux-gnu...
2005/09/06 12:07:08| Process ID 4525
2005/09/06 12:07:08| With 1024 file descriptors available
2005/09/06 12:07:08| DNS Socket created at 0.0.0.0, port 1027, FD 6
2005/09/06 12:07:08| Adding nameserver 217.237.151.97 from /etc/resolv.conf
2005/09/06 12:07:08| Adding nameserver 217.237.150.33 from /etc/resolv.conf
2005/09/06 12:07:08| helperOpenServers: Starting 10 'SquidClamAV_Redirector.py' processes
2005/09/06 12:07:08| User-Agent logging is disabled.
2005/09/06 12:07:08| Referer logging is disabled.
2005/09/06 12:07:08| Unlinkd pipe opened on FD 21
2005/09/06 12:07:08| Swap maxSize 102400 KB, estimated 7876 objects
2005/09/06 12:07:08| Target number of buckets: 393
2005/09/06 12:07:08| Using 8192 Store buckets
2005/09/06 12:07:08| Max Mem  size: 8192 KB
2005/09/06 12:07:08| Max Swap size: 102400 KB
2005/09/06 12:07:08| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2005/09/06 12:07:08| Rebuilding storage in /var/spool/squid (CLEAN)
2005/09/06 12:07:08| Using Least Load store dir selection
2005/09/06 12:07:08| Set Current Directory to /var/spool/squid
2005/09/06 12:07:08| Loaded Icons.
2005/09/06 12:07:09| Accepting HTTP connections at 0.0.0.0, port 3128, FD 23.
2005/09/06 12:07:09| Accepting ICP messages at 0.0.0.0, port 3130, FD 24.
2005/09/06 12:07:09| HTCP Disabled.
2005/09/06 12:07:09| WCCP Disabled.
2005/09/06 12:07:09| Ready to serve requests.
2005/09/06 12:07:09| Done reading /var/spool/squid swaplog (1035 entries)
2005/09/06 12:07:09| Finished rebuilding storage from disk.
2005/09/06 12:07:09|      1035 Entries scanned
2005/09/06 12:07:09|         0 Invalid entries.
2005/09/06 12:07:09|         0 With invalid flags.
2005/09/06 12:07:09|      1035 Objects loaded.
2005/09/06 12:07:09|         0 Objects expired.
2005/09/06 12:07:09|         0 Objects cancelled.
2005/09/06 12:07:09|         0 Duplicate URLs purged.
2005/09/06 12:07:09|         0 Swapfile clashes avoided.
2005/09/06 12:07:09|   Took 0.3 seconds (3440.5 objects/sec).
2005/09/06 12:07:09| Beginning Validation Procedure
2005/09/06 12:07:09|   Completed Validation Procedure
2005/09/06 12:07:09|   Validated 1035 Entries
2005/09/06 12:07:09|   store_swap_size = 8636k
2005/09/06 12:07:09| storeLateRelease: released 0 objects



Die /var/log/squid/SquidClamAV_Redirector.log hat keine neue Einträge.
Ich weiß wirklich nicht wo der Fehler liegt. Ich hoffe ihr könnt mir helfen.






Die Programm Versionen:

Python 2.3.5
pyclamav 0.3.0
squid 2.5
SCAVR 1.6.1


Hier meine momentane Squid.conf:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

hosts_file /etc/hosts

refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4320

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 192.168.1.0/255.255.255.0
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 443 563     # https, snews
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 manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow localhost
http_access allow localnet

http_access deny all

http_reply_access allow all

icp_access allow all

coredump_dir /var/spool/squid


# Eigene Erweiterungen

redirect_program /usr/local/bin/SquidClamAV_Redirector.py -c /etc/squid/SquidClamAV_Redirector.conf
redirect_children 10


Und noch meine SquidClamAV_Redirector.conf:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[SquidClamAV]
virusurl = http://virus.jackal-net.at/infected.php
cleancache = 300
ForceProtocol = http
MaxRequestsize = 2Mb
log_priority = LOG_INFO
log_facility = LOG_LOCAL6
acceptredirects = 300 301 302 303
MIMETypes = all image/bmp image/gif image/jpeg image/png image/tiff text/html text/plain text/css

[Debug]
Infected = true
Clean = true
Error = true
Ignored = true

[Extensions]
pattern = all .jpg .exe .zip .rar .ar .com .bzip .gz

[Proxy]
http = http://localhost:3128

[Whitelist]

hydraulik

Techno MUSS hart sein

  • »hydraulik« ist männlich

Beiträge: 211

Wohnort: Hessen

Beruf: Fachinformatiker - Systemintegration

  • Nachricht senden

2

10.09.2005, 00:49

Zitat

#/usr/local/bin/SquidClamAV_Redirector.py -c /etc/squid/SquidClamAV_Redirector.conf
http://freshmeat.net FOO FOO BAR


unter welchem benutzer läuft dein squid? haste das mit dem squid-user getestet oder als root? evtl. berechtigungsproblem?

DarkNova

Fortgeschrittener

  • »DarkNova« ist männlich
  • »DarkNova« ist der Autor dieses Themas

Beiträge: 520

Wohnort: Bayern

Beruf: Energieelektroniker

  • Nachricht senden

3

10.09.2005, 14:50

Zitat

Original von hydraulik

Zitat

#/usr/local/bin/SquidClamAV_Redirector.py -c /etc/squid/SquidClamAV_Redirector.conf
http://freshmeat.net FOO FOO BAR


unter welchem benutzer läuft dein squid? haste das mit dem squid-user getestet oder als root? evtl. berechtigungsproblem?


Das habe ich als root getestet.

Leider kann ich im Moment das mit den Berechtigungsproblemen nicht überprüfen denn mein Server hat den Geist aufgegeben. Irgendein Hardware defekt ich vermute das es das Motherboard ist. Sobald ich das repariert habe werde ich die Berechtigungen nochmals überprüfen. Danke für den Tipp

hydraulik

Techno MUSS hart sein

  • »hydraulik« ist männlich

Beiträge: 211

Wohnort: Hessen

Beruf: Fachinformatiker - Systemintegration

  • Nachricht senden

4

10.09.2005, 15:01

RE: SCAVR und Squid

Zitat

Original von DarkNova

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[SquidClamAV]
virusurl = http://virus.jackal-net.at/infected.php
cleancache = 300
ForceProtocol = http
MaxRequestsize = 2Mb
log_priority = LOG_INFO
log_facility = LOG_LOCAL6
acceptredirects = 300 301 302 303
MIMETypes = all image/bmp image/gif image/jpeg image/png image/tiff text/html text/plain text/css

[Debug]
Infected = true
Clean = true
Error = true
Ignored = true

[Extensions]
pattern = all .jpg .exe .zip .rar .ar .com .bzip .gz

[Proxy]
http = http://localhost:3128

[Whitelist]



[Proxy]-Sektion: lauscht dein squid auch wirklich auf der localhost-adresse?

Thema bewerten