[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

how do I use swatch to monitore a log file in real time

Asked by xserverx in Miscellaneous Security, Unix Systems Programming, Linux Administration

Tags: swatch, error log, real time, watchlog

Hello
some times I have somebody execute some harm requests on my site for example I have this entry "/home/user/public_html/sitemap.xml" match in  error_log look like  :

[Tue Nov 03 01:34:45 2009] [error] [client 82.251.118.118] File does not exist: /home/user/public_html/sitemap.xml



I woukd like swatch or whatever  program execute this command line to block the ip  :

apf -d  82.251.118.118

all must be done in REAL TIME when in same time that I have that match in error_log

is that be done by swatch or what program can do that how to do that ?



thank you




[+][-]11/02/09 05:56 PM, ID: 25725542Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/03/09 03:30 AM, ID: 25727834Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625