Oct 24

1. Introduction

I've got a FreeBSD 8 machine at home running mldonkey for downloading of several bitorrents and (still) edonkey files. Recently , because i don't impose connecting only to approved servers, i started getting 'viruses' as windows adwares through the files i'm downloading. Eventually I decided to install some kind of an anti virus on the machine to scan automatically these files.

OpenSource community offers today a vast amount of free anti viruses solution and some even in payment for BSD systems. I choose ClamAV after verifying with virus-total.com several of my compremised files and it recognized most of them.

2. Installation - Install Clamav

    BSD# cd /usr/ports/security/clamav && make install


3. Edit rc.conf file and insert these lines



4. Starting Clamav Daemon

    BSD# /usr/local/etc/rc.d/clamav-clamd start

5. POST Installation - Update virus database

   BSD# /usr/local/bin/freshclam
ClamAV update process started at Mon Oct 24 21:10:15 2011
main.cld is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cld is up to date (version: 13844, sigs: 15913, f-level: 60, builder: guitar)
bytecode.cld is up to date (version: 152, sigs: 38, f-level: 60, builder: edwin)

6. Update crontab to run freshclam every night. Add the following to your crontab:

00     2     *     *     *      /usr/local/bin/freshclam

15.9.14 UPDATE: As stated by one of our readers, Leander Schäfer, The above cronjob is not needed when freshclam daemon is configured via rc.conf (clamav_freshclam_enable="YES").

6. Example fo running a clamscan:

   BSD# clamscan -r -i -l scan.txt /home

(For scan plus remove use :

    BSD# clamscan -r -i –remove -l scan_home.txt /home/mother/Prince)


7. Verify Scan

   See the report :
    BSD# cat scan.txt



Viewed 25544 times.
Share |
How to migrate from o... (Daniel, 16:52 06/04/2013)
How to redirect SNMP ... (Daniel, 18:32 24/08/2012)
How to add httpd.conf... (Daniel, 19:20 24/03/2012)
How to avoid entering... (Daniel, 03:11 27/12/2011)
How to configure SOFT... (Daniel, 23:24 26/12/2011)
Subversion - Tortoise... (21:02 17/01/2010, 120990 views)
How to install Nagios... (01:08 23/12/2011, 51533 views)
How to avoid entering... (03:11 27/12/2011, 33584 views)
Byte Order Mark (BOM)... (17:36 22/02/2010, 31058 views)
How to install clamav... (21:13 24/10/2011, 25544 views)