Koozali.org: home of the SME Server

Clamav config not up to standard?

Offline ainigma32

  • *
  • 13
  • +0/-0
    • http://ainigma32.lir.dk
Clamav config not up to standard?
« on: November 08, 2004, 12:21:24 AM »
I've just installed Clamav using Swerts Knudsen's excellent install script. Everything was working as expected and after checking the installation I decided to check out the Clamav website. The first thing that struck me was the following topic: http://sourceforge.net/forum/forum.php?forum_id=420492
Quote
We are seeing a lot of useless traffic on our mirror servers.  
It looks like there are many broken freshclam clients still running.


and

Quote
Abusing clients will be added to a black list and won't be able to  
download our database anymore.


Since I don't particularly like to be blacklisted I solved this problem quick and dirty by adding two custom-templates:

Code: [Select]
/etc/e-smith/templates-custom/etc/freshclam.conf/36DatabaseMirror

and

Code: [Select]
/etc/e-smith/templates-custom/etc/freshclam.conf/37DatabaseMirror

The first file contains:

Code: [Select]
DNSDatabaseInfo current.cvd.clamav.net

The second contains:

Code: [Select]
DatabaseMirror database.clamav.net

I then expanded the templates and set the DatabaseMirror that was already present to the one nearest to me (db.nl.clamav.net) using the administrator panel.

I think that should do it but, like I mentioned earlier, this is a quick and dirty solution. Since I'm no SME guru I was wondering if this will satisfy the demands made by Clamav and how this could be incorporated into the administrator panel.

I didn't go into the cron settings (not using the full hour because everybody already does) but maybe one of the more experienced users could take a swing at that?

Anyway, any feedback would be greatly appreciated.
It's life Jim but not as we know it.........

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Clamav config not up to standard?
« Reply #1 on: November 08, 2004, 12:41:42 AM »
I am on the clamav announce list and received the same info.  I also made templates-custom modifications to my system to test.  The new settings work quite nicely.  If you run the freshclam test, you should see that if you don't need any updates, it completes much faster with the DNS settings.  

Jesper is working on making the necessary modifications to his script and hopefully can get them released real soon.

JB
......

Offline ainigma32

  • *
  • 13
  • +0/-0
    • http://ainigma32.lir.dk
Clamav config not up to standard?
« Reply #2 on: November 08, 2004, 09:31:47 AM »
Outstanding! I look forward to the modifications. Any thoughts on the schedule used for cron?
It's life Jim but not as we know it.........

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Clamav config not up to standard?
« Reply #3 on: November 09, 2004, 03:26:40 AM »
Don't think I can add any value with the cron settings.  I have mine set to daily.  I don't really think I need it set for every hour or two.

JB
......

Offline ainigma32

  • *
  • 13
  • +0/-0
    • http://ainigma32.lir.dk
Clamav config not up to standard?
« Reply #4 on: November 09, 2004, 10:51:50 AM »
I was referring to the following text in the Clamav documentation:
Quote
The other method is to use the cron daemon. You have to add the following line to the
crontab of the root or clamav users:
N * * * * /usr/local/bin/freshclam --quiet
to check for a new database every hour. N should be a number between 3 and 57
of your choice. Please don’t choose any multiple of 10, because there are already
too many clients using those time slots.


Does the contrib use a random number between 3 and 57 or does it use a multiple of 10? Maybe this should be changed as well when the contrib is updated?

This isn't a big issue but it could prevent performace problems in the future if the number of Clamav users keeps on growing.
It's life Jim but not as we know it.........

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Clamav config not up to standard?
« Reply #5 on: November 09, 2004, 02:24:24 PM »
If you look in /etc/crontab you can see when freshclam is run.  From the server-manager panel you have the choice of running the updates, every hour, 2 hours, daily or never.  If that doesn't suite you, then just create a templates-custom fragment and change the time you want to run the updates.

JB
......

Offline ainigma32

  • *
  • 13
  • +0/-0
    • http://ainigma32.lir.dk
Clamav config not up to standard?
« Reply #6 on: November 09, 2004, 06:28:48 PM »
Okay, I looked at it and freshclam is executed at 5 minutes past the hour (or two hours, or ...) which suits me just fine.

What I meant to say was that if enough SME-users install this contrib they will all try to update on 5 minutes past the hour. Now that's kind of cozy  :-D but I don't think the people of Clamav will appreciate it much. So I was thinking: Why not generate a random number or let the admin specify the setting through the web panel?
Like I mentioned before, this is no biggie but it could cause problems in the future.

Anyway I was planning to check out the "RPM's for dummies" documentation and I guess there's no time like the present  ;-)

Update:

Jesper has fixed the new directive: http://forums.contribs.org/index.php?topic=24796.0
It's life Jim but not as we know it.........

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Clamav config not up to standard?
« Reply #7 on: November 09, 2004, 11:33:24 PM »
Quote from: "ainigma32"
Okay, I looked at it and freshclam is executed at 5 minutes past the hour (or two hours, or ...) which suits me just fine.

What I meant to say was that if enough SME-users install this contrib they will all try to update on 5 minutes past the hour. Now that's kind of cozy but I don't think the people of Clamav will appreciate it much. So I was thinking: Why not generate a random number or let the admin specify the setting through the web panel?


I used Jespers (Knuddis) latest script and freshclam is executed at 24 minutes past the hour, so am assuming that he has generated a random number.

Trevor B

Offline ainigma32

  • *
  • 13
  • +0/-0
    • http://ainigma32.lir.dk
Clamav config not up to standard?
« Reply #8 on: November 09, 2004, 11:37:47 PM »
It just keeps getting better. Three thumbs up for Jesper :-D
It's life Jim but not as we know it.........

bigbri100

Error after upgrading Clam with latest script from Swerts.
« Reply #9 on: November 11, 2004, 10:43:28 PM »
It is probably something simple but after upgrading Clam I am getting the following warnings when running clamscan.

LibClamAV Warning: Unknown machine type in PE header
LibClamAV Warning: Broken PE header detected.

Everything appears to be working fine except for the warnings.

Any ideas?

Offline ainigma32

  • *
  • 13
  • +0/-0
    • http://ainigma32.lir.dk
Clamav config not up to standard?
« Reply #10 on: November 12, 2004, 10:11:41 AM »
Not sure but these guys have the same problem http://www.gossamer-threads.com/lists/clamav/users/14045?do=post_view_threaded
Seems that Clamav warns that the attached executable is broken/mangled.
I can't seem to find a buglist for Clamav anywhere to confirm. Anybody know where to find such a list?
It's life Jim but not as we know it.........