Installing and Configuring ICAP on ClamAV: Difference between revisions

From Wiki
(Created page with "= Procedure = == Install Packages on RHEL 9 == 1) Install Required Packages sudo dnf install clamav clamav-icap libclamav-dev libiCAP-dev == Step 2: Configure ClamAV == 1) Edit the main configuration file /etc/clamav/freshclam.conf 2) Set the `FreshClamDaemon option to yes FreshClamDaemon yes Save and exit the file 3) Start the ClamAV daemon: sudo systemctl start clamav-freshclam == Step 3: Configure ICAP Server == 1) Edit the ICAP server configuration...")
 
Line 5: Line 5:
1) Install Required Packages
1) Install Required Packages


 
sudo dnf install clamav clamav-icap libclamav-dev libiCAP-dev
sudo dnf install clamav clamav-icap libclamav-dev libiCAP-dev


== Step 2: Configure ClamAV ==
== Step 2: Configure ClamAV ==

Revision as of 13:02, 30 September 2024

Procedure

Install Packages on RHEL 9

1) Install Required Packages

sudo dnf install clamav clamav-icap libclamav-dev libiCAP-dev

Step 2: Configure ClamAV

1) Edit the main configuration file

/etc/clamav/freshclam.conf

2) Set the `FreshClamDaemon option to yes

FreshClamDaemon yes

Save and exit the file

3) Start the ClamAV daemon:

sudo systemctl start clamav-freshclam


Step 3: Configure ICAP Server

1) Edit the ICAP server configuration file:

  sudo nano /etc/clamav-icap.conf

2) Make the following adjustments:**

# Bind to all interfaces (adjust if needed)
ListenAddress 0.0.0.0

# Set the port (default is 1344)
ListenPort 1344

# Set the service name (optional)
ServiceName clamav-icap
# Set the request method (default is "REQMOD")
RequestMethod REQMOD

# Set the request type (default is "CHECK")
RequestType CHECK

# Set the ICAP version (default is "1.0")
ICAPVersion 1.0

# Set the log level (0-5, higher values are more verbose)
LogLevel 3

# Set the log file (adjust if needed)
LogFile /var/log/clamav-icap.log

# Enable verbose logging (optional)
VerboseLog yes

Save and exit the file

Step 4: Start the ICAP Server

sudo systemctl start clamav-icap

Step 5: Verify Configuration

1) Check the ICAP server's status

sudo systemctl status clamav-icap

2) Ensure there are no errors in the log file

tail -f /var/log/clamav-icap.log


Ver também