Clamav Daemon Mac

Dockerized open source antivirus daemons for use with

Sudo apt install clamav clamav-daemon Once installed, clamav can be used from a terminal to go over the entire system with a fine-tooth comb and sanitize any infected files. In addition to this, Clam AV provides powerful real-time scanning and resource-monitoring utilities as well. Sudo systemctl restart clamav-daemon Install and Configure ClamAV for Suse Linux Enterprise Server & OpenSUSE Leap To enable Malware Scanning with an Acunetix installation on Suse Linux Enterprise Server (tested with version 15 SP1) or OpenSUSE Leap (tested with version 15.1), you will first need to install ClamAV.

Memorandum: How to build ClamAV® - antivirus scanning engine on Mac OS X 10.4 through macOS 10.13, Compile ClamAV on Mac OS X 10.4, Mac OS X 10.5, Mac OS X 10.6, Mac OS X 10.7, OS X 10.8, OS X 10.9, OS X 10.10, OS X 10.11, macOS 10.12, macOS 10.13, macOS 10.14, macOs 10.15, macOs 11.0, Running clamd and freshclam as 'launch daemon', Running RunFreshclam as 'launch daemon', Running ClamXav. Clam AntiVirus Alternatives. The most popular alternative is Avast Free Antivirus.It's not free, so if you're looking for a free alternative, you could try Microsoft Defender or Avira Antivirus.If that doesn't suit you, our users have ranked more than 50 alternatives to Clam AntiVirus so.

  • file sharing containers like Nextcloud or
  • to use it via a REST proxy like @solita made clamav-rest or
  • to directly connect to clamav via TCP port 3310

ClamAV daemon as a Docker image. It builds with a current virus database andrunsfreshclam in the background constantly updating the virus signature database. clamd itselfis listening on exposed port 3310.

Find the latest releases at the official docker hub registry. There are different releases for the different platforms.

The container run as user clamav with uid=101 and gid=102.

Debian (default, :latest, :buster-slim, :stretch-slim)

  • buster-slim
  • stretch-slim

Alpine (:alpine, :alpine-edge)

  • alpine
  • alpine-edge

Linked usage recommended, to not expose the port to “everyone”.

Environment VARs

Proxy

Thanks to @mchus proxy configuration is possible.

  • HTTPProxyServer: Allows to set a proxy server
  • HTTPProxyPort: Allows to set a proxy server port

Database Mirror

Specifying a particular mirror for freshclam is also possible.

  • DatabaseMirror: Hostname of the mirror web server.

Custom Configuration Files

Mount custom configuration files into the container.

  • FRESHCLAM_CONF_FILE: Path to custom freshclam.conf file, e.g. /mnt/freshclam.conf.
  • CLAMD_CONF_FILE: Set the path to a custom clamd.conf file, e.g. /mnt/clamd.conf.

Persistency

Virus update definitions are stored in /var/lib/clamav. To store the defintion just mount the directory as a volume, docker run -d -p 3310:3310 -v ./clamav:/var/lib/clamav mkodockx/docker-clamav:latest

docker-compose

See example with Nextcloud at docker-compose.yml. You still need to configure the AntiVirus files app in Nextcloud.

Clamav Windows Download

You can find a tutorial here: https://www.virtualconfusion.net/clamav-for-nextcloud-on-docker/

Healthcheck

The images provide with check.sh a file to check for the healthyness of the running container. To enable the health check configure your docker run or compose file. The start period should be adjusted to your system needs. Slow internet connection, with limited cpu and IO speed might require larger values.

Examples

Via docker run:

Via docker-compose

This image provides support for different platforms

  • x86
  • amd64
  • arm32v7
  • arm64v8
  • OpenShift support in kuanfandevops fork

Memory?

Some users are wondering about memory consumption of clamd. Here is an explanation of the reasons I found:

“ClamAV holds the search strings using the classic string (Boyer Moore) and regular expression (Aho Corasick) algorithms. Being algorithms from the 1970s they are extemely memory efficient.

Clamav For Mac

The problem is the huge number of virus signatures. This leads to the algorithms’ datastructures growing quite large.

Clamav Daemon Mac Os

Mac

Clamav Windows

You can’t send those datastructures to swap, as there are no parts of the algorithms’ datastructures accessed less often than other parts. If you do force pages of them to swap disk, then they’ll be referenced moments later and just swap straight back in. (Technically we say “the random access of the datastructure forces the entire datastructure to be in the process’s working set of memory”.)

Clamav Daemon Mac

The datastructures are needed if you are scanning from the command line or scanning from a daemon.

You can’t use just a portion of the virus signatures, as you don’t get to choose which viruses you will be sent, and thus can’t tell which signatures you will need.” Source stackexchange.com

It is obvious that an antivirus engine based on virus signatures will raise memory consumption over the time as it always has to check for all signatures. As the number of virus signatures grows daily, the amount of necessary memory will increase as well.

This site is open source. Improve this page.