Difference between revisions of "Basic clamav configuration"

From Notes_Wiki
(Created page with "=Basic clamav configuration= ==Configuring and updating clamav== # Update system with latest clamav and clamav-db packages # Open file '<tt>/etc/freshclam.conf</tt>' ## Com...")
 
m
Line 1: Line 1:
<yambe:breadcrumb>Clamav configuration</yambe:breadcrumb>
=Basic clamav configuration=
=Basic clamav configuration=


Line 54: Line 55:
</pre>
</pre>
in this cron file for updating clamav.
in this cron file for updating clamav.
<yambe:breadcrumb>Clamav configuration</yambe:breadcrumb>

Revision as of 02:25, 15 March 2015

<yambe:breadcrumb>Clamav configuration</yambe:breadcrumb>

Basic clamav configuration

Configuring and updating clamav

  1. Update system with latest clamav and clamav-db packages
  2. Open file '/etc/freshclam.conf'
    1. Comment line
      Example
    2. Configure
      LogTime yes
      HTTPProxyServer facultyproxy.iiit.ac.in
      HTTPProxyPort 8080
  3. Run freshclam. If you see configuration file missing messages then run freshclam again.



Using clamav for scanning files manually

Use command 'clamscan -ir <dir_name>' to use clamav scanner on some directory.



Virus submissions

If some virus is not detected by clamav even with latest databases then that can be submitted at website http://www.clamav.net/sendvirus



Adding freshclam to crontab

Add following line to /etc/crontab

   17 * * * *  /usr/bin/freshclam --quiet

Note that any other number can be used in place of 17. Try to use numbers between 3 and 57 which are not multiples of 10.


Must install clamd when using freshclam

Freshclam script stored at '/etc/crond.daily/freshclam' requires clamd to be installed as it checks for file '/etc/clamd.conf' else error message would be generated. If installation of clamd is not desired then example config file for clamd can be downloaded from Internet and stored as '/etc/clamd.conf'.

On fedora installation of clamav can also create cron update file '/etc/cron.d/clamav-update'. This file causes freshclam-sleep which generates error if direct net is not reachable. To avoid error messages from this file and continue getting clamav updated we can use

0  */3 * * * root /usr/bin/freshclam > /dev/null 2>&1

in this cron file for updating clamav.


<yambe:breadcrumb>Clamav configuration</yambe:breadcrumb>