HowTo: OpenMediaVault - Configure and activate ClamAV virus scanner

As a Windows user, you are used to the fact that there is always a virus scanner somewhere in the background watching out and immediately informing you of any malware infection or already acting accordingly.
I use for this under Windows Avira Free Security and am also very satisfied with it.

Only, of course, this program does not run on my OpenMediaVault instance. So how do I protect my files when they are stored on it?

Fortunately, the developers of OpenMediaVault also provide you with a practical plugin. With this plugin you can install the free open source virus protection program "ClamAV" on your OMV instance.

Once configured, incoming and outgoing traffic is automatically monitored. You can also configure regular scans of your folders. If a malicious program is found, ClamAV will automatically delete it or move it to a quarantine folder.

Everything you need to know to configure ClamAV in your OMV instance is described in the following article.


Safety instructions

I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/

Affiliate links/advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂 


Requirements

Before you start with this article, you should have prepared the Raspberry Pi so that it can be reached via the network and controlled via SSH. It should also have OpenMediaVault installed and running.

The following articles describe what needs to be done to prepare your Raspberry Pi:

In the following lists you will find all the parts you need to implement this article.

Required tool:

NumberLink
1xScrewdriver set  Buy at Amazon
1xSD card reader  Buy at Amazon

Required material:

NumberLink
1x Raspberry Pi  Buy at Amazon
1x Raspberry Pi power supply  Buy at Amazon
1x Raspberry Pi case  Buy at Amazon
1x Micro SD card 64GB  Buy at Amazon


Install ClamAV plugin via the OpenMediaVault interface

In order to use the functions of the ClamAV plugin, you need to install it first.

Installation is very simple thanks to the OMV interface.

To do this, first click on the heading

  • plugins

in the section

  • system

The fastest way to find the ClamAV plugin is to use the search function in the upper right corner.

Simply enter "clam" there. The ClamAV entry should then be the only one visible.

Mark this entry by clicking on it and start the installation by clicking on the small blue arrow in the marked area.

You must then confirm the start of the installation again by clicking on "Yes".

The installation will then be started.

As soon as it is completed, you can leave the installation area by clicking on "Close".

The changed configuration you must then again (as usual) by clicking on the shown hook....

...and confirm by clicking on the "Yes" button.


Activate and configure ClamAV Antivirus Plugin

The ClamAV plugin is now installed but not yet activated (or even configured).

To do this, switch to the tab

  • services

and opens the area

  • antivirus

Click there on

  • Settings

On the page that appears, you can make all the basic settings.

First activate ClamAV by ticking the "Enabled" box.

You should also set the "Database checks" setting to 12. This means that ClamAV automatically updates its virus database every 12 hours. This is important in order to reliably detect new malware.

You can also select a shared folder in which any malware found should be stored. It is best if you define a separate "quarantine folder" for this.

Simply create a folder as usual. I have described how to do this here:

You can apply the other settings as shown.

In my opinion, they are a good compromise to reliably detect malware but at the same time not overload the system.

Then click on "Save" to apply the settings.

You must then confirm the configuration change again.

To do this, click on the hook shown...

...and click on "Yes" in the next window.


Enable live/on access scanning from ClamAV

To ensure that your shared folders are automatically scanned for malware, you now need to configure them for "On Access Scans". Once activated, all data traffic in these folders will be monitored. If a malicious program is found, it is automatically deleted (depending on the configuration) or moved to the quarantine folder.

Click on the tab

  • On access scans

Then click on the small blue plus icon to add a new folder to the live monitoring.

Then select the folder you want to add to the live monitoring and click on "Save".

Again, you must confirm the configuration change before it is applied.


Enable and configure scheduled ClamAV scans

In parallel to live monitoring, you can also configure ClamAV to regularly scan shared folders for malware.

Click on the tab

  • Scheduled scans

...and then on the small blue plus in the marked area.

Here you can select a folder from the list of your shared folders

You can also configure at which times this scan will be executed.

In the example shown, the scan is started every day of the month (each represented by the *) at 21:00. However, this only happens on the weekdays Monday and Tuesday.

In addition, you can also set what should happen to detected malware here.

In my opinion, it is best to move infected programs to quarantine (if configured). Of course, you can also delete the malicious program directly or do nothing. In the latter case, you will only be informed about the detection.

You should of course have activated the last item "Send mail".

To save the settings, click on "Save".

Again, you must confirm the configuration change before it is applied.


More articles related to OpenMediaVault

I have described the many other functions of OpenMediaVault in other articles. All articles on the subject can be found here


Have fun with the project

I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂

PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂

Buy Me a Coffee at ko-fi.com       

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.