Forum Moderators: DixonJones
211.XXX.13.110*[03/Aug/2004:06:09:54 -0700]*GET http://www_datecam_com/dchit.php?cid=712425 HTTP/1.1*http://www_happysky_us*M
ozilla/4.0 (compatible; MSIE 5.5; Windows 98)*302*38*-
Does anyone know what is going on here?
Thanks!
(dots replaced with underscores in the domain names)
[edited by: DaveAtIFG at 5:49 pm (utc) on Aug. 3, 2004]
[edit reason] IP obscured too [/edit]
# LOG FILE SPAMMERS
RewriteCond %{REMOTE_ADDR} ^211\.100\.13\.110$ [NC,OR]
RewriteCond %{HTTP_REFERER} (happysky\.us¦mytravelrates\.com¦thetravel\.us¦blazerunner\.com¦abcsearch\.com) [NC,OR]
RewriteCond %{THE_REQUEST} (happysky\.us¦mytravelrates\.com¦thetravel\.us¦blazerunner\.com¦abcsearch\.com) [NC]
RewriteRule ^.* - [F]
to my .htaccess so they will be banned (htaccess gurus feel free to correct).
RewriteCond %{THE_REQUEST} ^GET\ http.*$ [NC]
RewriteRule ^.* http://%{REMOTE_ADDR}/ [F,E=nolog:1]
This should block all requests of the type
GET [......]
Unless you use requests this on your server.
For me normal requests are
GET /foo/index.html
(i.e. no http)
The part E=nolog:1 is supposed to tell apache not to log it. I haven't really tested all this though, any mod_rewrite gurus out there?
The above didn't work as far as not logging the requests. I'm going to try changing my CustomLog line from
CustomLog /usr/local/apache/logs/access_log custom
CustomLog /usr/local/apache/logs/access_log custom env=!nolog
<IfModule mod_setenvif.c>
# try to stop log spam
SetEnvIf Request_URI "^http.*" nolog
# doesn't work!# for testing ... worked :
SetEnvIf Request_URI "^/fubar.*" nolog
</IfModule>
The first one didn't work but I think that's because of how the Request_URI is handled (I think in a request like GET [foo.com...] only the goo.htm part is contained in the Request_URI ... I think).
apache mod_setenvif documentation [httpd.apache.org]
I'd really like to get the rewrite version working anyway though. Does anyone know how to replicate these bogus get requests? If so could you please tell me/us (I won't spam your logs, promise ;). The reason is so that I can test things instead of waiting for them to spam me before knowing if things work. I've turned up the logging on mod_rewrite and left those mod_rewrite directives in there so we'll see what those logs show.
BTW, if you want to try any of this make sure you have mod_setenvif and mod_env and mod_rewrite installed.
grep -ve "GET http"
66.66.66.66*[16/Aug/2004:01:55:21 -0700]*GET /foo/goo.html HTTP/1.1*http://www.google.com/search?hl=en&ie=ISO-8859-1&q=foo+goo*Mozil
la/4.0 (compatible; MSIE 5.0; Mac_PowerPC)*200*17853*-