ASKER
ASKER
#!/bin/bash
# mail a report to x@x.com
retail /var/log/vsftpd.log | logtool -o ascii -i /usr/local/etc/logtool-ftpsuccess.inc > /tmp/mail.msg
if [ -s /tmp/mail.msg ] ; then
cat /tmp/mail.msg | mail -s "Successfull FTP Login" Your@mail.address
fi
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
Security is the protection of information systems from theft or damage to the hardware, the software, and the information on them, as well as from disruption or misdirection of the services they provide. The main goal of security is protecting assets, and an asset is anything of value and worthy of protection. Information Security is a discipline of protecting information assets from threats through safeguards to achieve the objectives of confidentiality, integrity, and availability or CIA for short. On the other hand, disclosure, alteration, and disruption (DAD) compromise the security objectives.
TRUSTED BY
Install the two programs and read the documentation here:
http://xjack.org/logtool/logtool.txt
You can do a lot of things, but what you want is basically:
* Configure logtool to filter the messages from vsftpd.log to get the successfull ftp logins.
* Combine it with retail in a cronjob to run every minute
* Send the eventually generated output via email
Samples of this are in the link provided above.
The retail command is like a tail, it tails text-files, but it has a memory, so if you run it again on the same file, it knows where it left of before and just delivers the new information.
With this you should be able to get near realtime information on the ftp logins!
best
Ray