Integrating ClamAV with PureFTPd in CentOS 5.4
In the following article TipsMake.com will show you how to integrate ClamAV application with PureFTPd to scan viruses in CentOS system platform 5.4. When completed, any data that goes through PureFTPd, ClamAV will automatically check and delete if it detects suspicious signs .
Preliminary note
PureFTPd is installed and works well on CentOS 5.4 server system.
Install ClamAV
In fact, ClamAV is not available on CentOS repository, so we must enable RPMforge repository:
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
cd / tmp
wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Then proceed to install ClamAV as follows:
yum install clamav clamd
Next create the boot path for clamd and activate it at the same time:
chkconfig --levels 235 clamd on
/ usr / bin / freshclam
/etc/init.d/clamd start
Set up PureFTPd
First, open the /etc/pure-ftpd/pure-ftpd.conf file and set the CallUploadScript value to yes:
vi /etc/pure-ftpd/pure-ftpd.conf
[.]
# If pure-ftpd đã được biên dịch với pure-uploadscript support,
# sẽ sẽ tạo pure-ftpd ghi info về mới uploads big
# /var/run/pure-ftpd.upload.pipe so pure-uploadscript can read it and
# spawn a script để xử lý việc đăng tải.
CallUploadScript yes
[.]
Then, create the file /etc/pure-ftpd/clamav_check.sh (with the function to call / usr / bin / clamdscan whenever data 'goes through PureFTPd'):
vi /etc/pure-ftpd/clamav_check.sh
#! / bin / sh
/ usr / bin / clamdscan --remove --quiet --no-summary "$ 1"
And assign executable properties to the application:
chmod 755 /etc/pure-ftpd/clamav_check.sh
Then, starting the pure-uploadscript program as a daemon application - the program will call the /etc/pure-ftpd/clamav_check.sh script whenever the data is downloaded via PureFTPd:
pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh
Besides, most people don't want to activate the daemon program every time they start the system, so do the following: open /etc/rc.local .:
vi /etc/rc.local
and add the following command line / usr / sbin / pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh. Examples are as follows:
#! / bin / sh
#
Số script này sẽ được thực hiện * sau * tất cả các phiên bản init khác.
# Bạn có thể đặt một tên của bạn đầu tiên thiết bị trong đây If bạn không
# want to do full sys V style init stuff.
/ usr / sbin / pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh
touch / var / lock / subsys / local
Then restart PureFTPd:
/etc/init.d/pure-ftpd restart
So, you have completed the integration of ClamAV security program with PureFTPd, and every time the data is transferred through here, ClamAV will work, review and automatically delete the suspected files infected.
Good luck!
You should read it
- What is CentOS? Learn about the CentOS operating system
- How to install CentOS Stream on PC
- iRedOS-0.6.0: Open source Mail Server system
- Guide to creating Virtual Hosting with PureFTPd and MySQL
- How to install the latest LibreOffice version on CentOS 8
- Cisco Linksys WRT160NL - 'toy' specifically for open source people
- How to install CentOS on a Raspberry Pi
- How to install the Arduino IDE on CentOS 8
May be interested
- How to install VLC Media Player 3 on CentOS 8on centos 8 linux systems, this media player software is not available by default. you will have to install vlc using third-party packages. in this article, tipsmake will join you to learn how to install vlc on centos 8 linux.
- How to install Adobe Flash Player on CentOS 8adobe flash player can also be installed on many types of operating systems, including windows, macos, linux / unix and android. in this article, you will learn how to install adobe flash player on centos 8 using terminal.
- How to install multiple Java versions on CentOS 8java is one of the most widely used high-level programming languages. in this article, readers will learn how to install different versions of java on centos 8.
- How to install the latest LibreOffice version on CentOS 8libreoffice is a powerful and open source office suite. in this article, you will learn how to install libreoffice on centos 8. at the time of writing this article, the latest version of libreoffice 6.4.3 is available for installation.
- How to Set up Php on Apache 2.2.3 on CentOS 5.3this article is aimed at people who have centos 5.3 and apache 2.2.3. it may also work on rhel (but you have to pay for rhel). connect to your vps using ssh to get a command line (unless its being installed on your local machine). your...
- How to install Microweber CMS on CentOS and Rocky Linuxmicroweber is a free, open source drag-and-drop cms website builder written in the php programming language and laravel 5 framework.
- Is CentOS or Ubuntu the best web hosting server operating system?with so many available linux distributions, choosing a suitable distro for your home computer is not easy. choosing a linux distribution for the server is even more difficult.
- Mozilla launched Firefox Focus for Android, integrating ad blockingthe browser is small, simple to design, anonymously browse the web all the time, integrating an ad blocking tool.
- Setting up Mail Server on the Debian platformin the following article, tipsmake.com will guide you how to set up a full-featured, secure, easy-to-expand mail server system and replace some other functions if necessary
- Instructions for using FreeRADIUS for Wi-Fi authentication - Part 2in this article, i will show you how to open the centos firewall and configure access points (aps).