Using Apache mod_security and .htaccess to block comment spam on the web

Comment spam is the most annoying thing to web operators. Besides eating up bandwidth, comment spam can pollute web discussions area and which gives bad impression to visitors.

Apache HTTPD mod_security module can be configured to reduce web spam by filtering common keyword, content and referrer used by spam bots around the internet.

Here’s an example of .htaccess file to block common comment spam :

<IfModule mod_security.c>
SecFilterEngine On
SecFilterScanPOST On
SecFilterDefaultAction "deny,nolog,auditlog,status:503"
SecFilterSelective POST_PAYLOAD "(mortgage|viagra|poker|traffic|discount|medical|casino|lyrics|loan)"

</IfModule>

Please ensure that your Apache installation has mod_security module enabled. The method is suitable to be used on websites that receive a lot of user comments like forums, blogs (including WordPress and Drupal) and photo gallery.

Note: This is not a full-proof solution as it depends on the use of keywords.

Sporadic update….

Hey there guys, I know I havent been writing much. I’ve even missed the August month completely!, the thing is, I currently working on a project which demands most of my creative time, and by the time I’ve some free time to spare, I’ve already gone tired.

But rest assured, I’ll begin to make time again as I’ve already on the final phase of the research project. Be sure to remind me every now and then to write stuff around here!

ImageMagick thumbnailer scripts for blog

Hey there, I’d like to share my dirt-easy script for creating thumbnail in blog post. The script will scale any image to the width of 456pixels which I find acceptable by most blog theme (actually the limit is around 460-465 pixel, but better be safe).

Why I wrote yet another script for scaling images? because I find blogger.com and WordPress system of uploading images and photo annoys me, and I rather upload my pictures/photos on my own private server and create thumbnails on my own.

I licensed the download under WTFPL , don’t worry its a free software license.

Download : thumbnailer.sh

Melayubuntu – the best local Ubuntu blog

Today I would proudly write about a fine, if not the best local Ubuntu blog for Malaysian, Melayubuntu. Best of all, its written in Malay !

The website is filled with loads of Ubuntu tips which is useful for Ubuntu users, whether they are new or an old timer. It is the one particular blog which should be worth subscribing for.

Secure your WordPress installation now, avoid from being compromised

Following recent announcement from Technorati about WordPress security vulnerability issue and the fact that there are a lot of WordPress sites that has been compromised. It is recommended those who are running WordPress blog to upgrade and tightens their WordPress site security to prevent it from being injected with malicious or spammy code.

Here are few pointers that might help you secure your WordPress installation to prevent it from being cracked into :

Remember you will be responsible for all the damage caused by the crackers should your site been cracked into