How to run ClamAV and Maldet together on cPanel server?

You may be familiar with ClamAV and Maldet scanner (aka Linux Malware Detect). They're widely known as two excellent choices for identifying malware on Linux environment. What you may not realize, is that they can be team up together. The benefit of doing this is a faster, more effective malware scan, meaning; you're more likely to identify potential threats. This tutorial is based on cPanel/WHM system. We will install and configure both ClamAV and Maldet (LMD).

 

Installing ClamAV

 

Click here for complete steps of installing ClamAV from cPanel/WHM.

Installing Maldet

 

  1. Login into your VPS via SSH as the root user.

  2. Run below commands to install LMD (Linux Malware Detect).

    cd /usr/local/src/ 
    wget http://www.rfxn.com/downloads/maldetect-current.tar.gz
    tar -xzf maldetect-current.tar.gz
    cd maldetect-*
    sh ./install.sh

 

Linking both ClamAV and Maldet together for the best performance

 

If you were to run a Linux Malware Detect scan now, it would run with no problem, however, it would not include ClamAV's definitions, therefore slowing down the scan completion time and threat detection ratio. To solve this, we must create two symbolic links, as follows:

 

 
ln -s /usr/local/cpanel/3rdparty/bin/clamscan /usr/local/bin/clamscan
ln -s /usr/local/cpanel/3rdparty/bin/freshclam /usr/local/bin/freshclam

 

Running a malware scan

 

Now when you run Maldet scan, it will also include the definition of ClamAV. If you wanted to run a malware scan of /home, you just need to run below command.

 

maldet -a /home/?

 

The above command will scan all files and directories within the /home directory, which is where the content for cPanel accounts is stored.

  • 1 Users Found This Useful

Was this answer helpful?

Related Articles

How to Check Bandwidth Usage from WHM Panel?

Within WHM (Web Host Manager), you can check the bandwidth usage of each website hosted. Here are...

How to install the Zabbix agent version 3.0 on Debian 9 (strech)?

Zabbix is an Open-source monitoring tool use to monitor the health of servers, networks and other...

Will internal traffic between two VPS viz. a Database Server and a Web Server be counted in my bandwidth usage?

Yes it will. The traffic will be counted in the bandwidth usage of your VPS. Even if you use...

On which platform Linux VPS are configured?

We configure Linux VPS on XEN virtualization technique. However, Linux Cloud VPS are configured...

How to Manage Linux VPS (SSD and Traditional) From Client Area?

This article will assist you to manage your Linux VPS (SSD and Traditional) from client area...