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

Stephan H. Wissel, 2004-12-20

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.

Ragnar Schierholz, 2004-12-20

I published a summary of anti-spam measures here (in German):
http://vnude.typepad.com/itfrontal/2004/12/spamschutz_in_w.html

Heiko Hebig, 2004-12-20

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.

Wolfgang Sommergut, 2004-12-20

I guess in English it´s call privacy protection. :-)

Adalbert Duda, 2004-12-20

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.

Sascha Carlin, 2004-12-20

Recent comments

Volker Weber on Tim Cook: The Genius Who Took Apple to the Next Level :: Leander Kahney #nowreading at 13:04
Moritz Petersen on Tim Cook: The Genius Who Took Apple to the Next Level :: Leander Kahney #nowreading at 13:01
Jörg Weske on long ambients two :: moby at 20:48
Manfred Wiktorin on Schnelle Updates beim Galaxy S10 at 13:45
Volker Weber on Schnelle Updates beim Galaxy S10 at 09:50
Thomas Cloer on Schnelle Updates beim Galaxy S10 at 09:45
Lars Berntrop-Bos on Schnelle Updates beim Galaxy S10 at 02:02
Volker Weber on Schnelle Updates beim Galaxy S10 at 23:59
Lukas Gerlich on Schnelle Updates beim Galaxy S10 at 21:27
Marco Schirmer on Microsoft Surface Hub 2S Event Recap at 18:28
Volker Weber on Microsoft Surface Hub 2S Event Recap at 17:31
Amy Blumenfield on Microsoft Surface Hub 2S Event Recap at 17:28
Ragnar Schierholz on Microsoft Surface Hub 2S Event Recap at 16:51
Volker Weber on Withings Waage erhält Funktion zur Herzgesundheit zurück at 06:11
Ingo Harpel on Amazon and Google stop fighting their customers at 18:27
Bernd Hofmann on Withings Waage erhält Funktion zur Herzgesundheit zurück at 17:21
Hannes Niebuhr on Amazon and Google stop fighting their customers at 17:21
Thomas Cloer on Amazon and Google stop fighting their customers at 16:53
Andreas Pfau on Amazon and Google stop fighting their customers at 16:23
Frank van Rijt on Samsung lebt in interessanten Zeiten at 15:45
Friedrich Holstein on Withings Waage erhält Funktion zur Herzgesundheit zurück at 13:47
Nina Wittich on Ein wunderbares Video at 13:19
Christoph Rummel on Withings Waage erhält Funktion zur Herzgesundheit zurück at 12:58
Andreas Weinreich on Withings Waage erhält Funktion zur Herzgesundheit zurück at 11:58
Hanno Zulla on Elektroschrott zum Schnäppchenpreis at 08:46

Ceci n'est pas un blog

I explain difficult concepts in simple ways. For free, and for money. Clue procurement and bullshit detection.

vowe

Contact
Publications
Stuff that works
Amazon Wish List
Frequently Asked Questions

rss feed  twitter  amazon

Local time is 16:14

visitors.gif

buy me coffee

Paypal vowe