Rkhunter Installation
Rkhunter
Rkhunter is a very useful tool that is used to check for trojans, rootkits, and other security problems. This tutorial will touch on installing and setting up a daily report for rkhunter.
Installation
– Login to your server as root. (SSH)
– Download the Rkhunter.
# wget http://downloads.rootkit.nl/rkhunter-1.2.7.tar.gz
– Unpack the chkrootkit you just downloaded.
# tar -zxvf rkhunter-1.2.7.tar.gz
– Change to new directory
# cd rkhunter-1.2.7
– Install it
# ./installer.sh
Now you can run a test scan with the following command:
# /usr/local/bin/rkhunter -c
How to setup a daily scan report?
# vi /etc/cron.daily/rkhunter.sh
– add the following replacing your email address:
=====================================================
#!/bin/bash
(/usr/local/bin/rkhunter -c –cronjob 2>&1 | mail -s “Daily Rkhunter Scan Report” email@domain.com)
=====================================================
# chmod +x /etc/cron.daily/rkhunter.sh
OR
Set Cron as below :
– Load crontab
# crontab -e
Add this line to the top:
=====================================================
0 1 * * * (/usr/local/bin/rkhunter -c 2>&1 | mail -s “Daily Rkhunter Scan Report” email@domain.com)
=====================================================
Note: Replace email@domain.com with your email address.
Save and exit.
🙂 🙂 🙂 🙂
Leave a Reply