Site news: No referrer, no comment
by Volker Weber
If your personal firewall* blocks referrers, you can no longer post comments to the site. This is another effort to block malicious bots:
RewriteCond %{REQUEST_FILENAME} mt-cmmnt.cgi [NC]
RewriteCond %{HTTP_REFERER} !^http://vowe\.net.*$ [NC]
RewriteRule (.*) - [F,L]
Comment spam bots call cgi without going through the site. For now they are coming in with a blank referrer. Using mod_rewrite it is rather simple to divert them with a 403 return code before they hit cgi, thus avoiding any unnecessary load on the server.
Maybe I will add another rule for those smartass people that send a long string of ++++ instead of a referrer.
*) Technically you are not using a firewall but rather a local proxy server that takes requests from your browser, processes them and then relays the request to the site. Symantec calls the stripping of referrers Browser-Datenschutz in german. No idea how they call this in english.
Comments
Hi Volker,
there have been bits and pieces of defense information published on your blog. Do you have a summary? Kind of problem/solution table?
:-) stw
I guess, that would probably be read by spam bot authors pretty soon and would be a comprehensive compendium on which countermeasures to by-pass to even access a well-protected blog. In order to be one step ahead, this might not be such a good idea.
I published a summary of anti-spam measures here (in German):
http://vnude.typepad.com/itfrontal/2004/12/spamschutz_in_w.html
I'm using this rule since two weeks, no more spam so far - but hundreds of HTTP 403s in my log file.
Since you have to allow the comment script's URL as a referrer (because of comment previewing), it will be easy for spambots to fake a correct referrer - they just have to insert the script address. Guess it won't take too long until "smart" spambots will exploit that weakness.
I guess in English it´s call privacy protection. :-)
I can live without previews. Personally, I find them annoying. I proof read in the edit form and I an error slips through, well, that's life.
We could enforce the referer rule by using a regex like
!^http://vowe\.net/([0-9]+)\.html$
to ensure only requests made from entry archives are accepted.
And to check for either an entry archive or the comment cgi, we could use this (untested, but should work after some testing ;) )
RewriteCond %{REQUEST_FILENAME} mt-cmmnt.cgi [NC]
RewriteCond %{HTTP_REFERER} !^http://vowe\.net/([0-9]+)\.html$ [OR]
RewriteCond %{HTTP_REFERER} !^http://vowe\.net/cgi-bin/mt-cmmnt\.cgi$ [NC]
RewriteRule (.*) - [F,L]
If not this way, mod_rewrite also provides chaining, which also could solve the problem.
Post a comment
Recent comments
Gregory Engels
on International OpenOffice market shares at 16:53
Mathias Ziolo
on International OpenOffice market shares at 14:58
Gregory Engels
on International OpenOffice market shares at 14:47
Gregory Engels
on International OpenOffice market shares at 14:17
Andrew Magerman
on International OpenOffice market shares at 11:19
Hans Bornich
on Download and install Symphony 3 Beta 2 in 20 easy to follow steps at 10:35
Hynek Kobelka
on Leiterin Kommunikation und Presse, ahnungslos at 10:02
Dirk Steins
on Do you see it? at 08:01
Arthur Fontaine
on Do you see it? at 07:43
patrick picard
on Do you see it? at 00:30
Mathias Ziolo
on Leiterin Kommunikation und Presse, ahnungslos at 18:21
Thomas Lang
on FT.com - A fight over freedom at Apple's core at 17:35
Giulio Campobassi
on Download and install Symphony 3 Beta 2 in 20 easy to follow steps at 11:23
Peter Foster
on iPhone OS 3.1.3 brings back Internet Tethering to unlocked iPhones at 19:17
Volker Weber
on iPhone OS 3.1.3 brings back Internet Tethering to unlocked iPhones at 07:38
Peter Foster
on iPhone OS 3.1.3 brings back Internet Tethering to unlocked iPhones at 03:18
Paul Mooney
on FT.com - A fight over freedom at Apple's core at 18:12
Todd dal
on iPhone OS 3.1.3 brings back Internet Tethering to unlocked iPhones at 23:03
Frank Paolino
on Clothing drive at 22:47
Craig Wiseman
on Embrace Life at 22:27
Volker Weber
on Clothing drive at 20:40
Carl Tyler
on Clothing drive at 20:28
Claude Lehmann
on FT.com - A fight over freedom at Apple's core at 19:13
Ragnar Schierholz
on FT.com - A fight over freedom at Apple's core at 19:02
Volker Weber
on FT.com - A fight over freedom at Apple's core at 12:23



