I run an Apache web server on my intranet, but I occasionally get "hits" from "outside" when I dial up my ISP. No problem there though. A bandwidth problem did occur though when all the code red started, and I decided a few days ago to start filtering out some of the cr*p. So I devised (ha!) a set of rules shown below that I thought would do the trick, and also stopped logging all the image files and style sheets I have on my system, to keep the logs getting cluttered:
This half works:
1. All my image files and CSS files no longer appear in my logs.
2. The default.ida?NNNNN stuff appears in the MSexploits_log, but also appears in my access_log which it shouldn't ....
I'm sure it's my regex that's causing the problem but I can't see why or where.
Alternatively, should I be looking at multiple env=!dontlog such as env=!dontlog !MSExploit but I can't see any reference to this in the docs.
Can anyone please help me on this ?
Code:
SetEnvIfNoCase request_URI (.png$|.gif$|.jpg$|.wbmp$) dontlog
SetEnvIfNoCase request_URI "/css/*" dontlog
SetEnvIfNoCase request_URI "/status/*" dontlog
CustomLog /var/log/httpd/combined_log combined env=!dontlog
CustomLog /var/log/httpd/access_log common env=!dontlog
SetEnvIfNoCase request_URI "/scripts/*" MSExploit
SetEnvIfNoCase request_URI "(/root.exe$|/cmd.exe$|/default.ida$)" MSExploit
CustomLog /var/log/httpd/MSexploits_log common env=MSExploit
1. All my image files and CSS files no longer appear in my logs.
2. The default.ida?NNNNN stuff appears in the MSexploits_log, but also appears in my access_log which it shouldn't ....
I'm sure it's my regex that's causing the problem but I can't see why or where.
Alternatively, should I be looking at multiple env=!dontlog such as env=!dontlog !MSExploit but I can't see any reference to this in the docs.
Can anyone please help me on this ?