OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: guest23448 on February 15, 2020, 04:57:19 PM

Title: Clamav Scan in ZIP-Files
Post by: guest23448 on February 15, 2020, 04:57:19 PM
Hi there,

I am new to OPNsense and can't manage to scan ZIP-Files with ClamAV. Tested with EICAR test virus (HTTP / HTTPS). It works for non-zip files both HTTP / HTTPS, but not for ZIP. Anyone able to shortly check if it is working on his configuration?

OPNsense: 20.1.1 (but was also not working on 20.1)
C-ICAP: 1.7
ClamAV: 1.7 with engine 0.102.1

Thanks!
Title: Re: Clamav Scan in ZIP-Files
Post by: miroco on February 15, 2020, 11:47:49 PM
These are my ClamAV settings and they successfully scanned and detected a "contaminated" zip-file.

http://www.rexswain.com/eicar.html

Did you also configure Web Proxy (Squid)?


miroco
Title: Re: Clamav Scan in ZIP-Files
Post by: guest23448 on February 16, 2020, 11:46:59 AM
Thanks a lot miroco - this solved the problem!

After hours of testing, resetting the cache etc., searching google for terms in the Proxy access log and questioning myself why I always get a TCP_MISS/200 thus test virus remains undetected - it was a stupid typo error in the archive config section of ClamAV  ::)  >:(

Compared to your screenshots, I forgot the "M" after the number entered in "Max scan size"...

Now it works!



Title: Re: Clamav Scan in ZIP-Files
Post by: guest23448 on February 25, 2020, 03:17:27 PM
Is somebody able to explain the correlation between the scan size settings in Web Proxy - C-ICAP and ClamAV. I do not know if I get it right.

Is the priority fixed (Proxy - C-ICAP-ClamAV) and overrides in worst case?

Specific:

Web Proxy/Administration/ICAP
Preview size: 1024K
Object size (don't know if there is also a size and can't test currently): X

C-ICAP/Antivirus
- Max Object Size: 30M
- Send Percentage data: 25%
- Start send percentage data: 6M

ClamAV
- Max scan size: 100M
- Max file size: 30M

Questions related to scan performance and quality:

How do you see this?