Category Archives: computerstuff

wordpress comment spam has become insane.. fail2ban to the rescue

This informative blog post shows how to configure the fail2ban software to prevent the idiotic comment spam from causing high load on the server. Of course the excellent Kismet plugin stops the vast majority of it from appearing, but even the constant POST attempts to pump spam into the server was causing high load.
One minor tweak is in the case of this blog I had to change:
failregex = ^ -.*POST /wordpress/wp-comments-post.php
to
failregex = ^ -.*POST /wp-comments-post.php
to match the URL location on this site, but otherwise now its blocking repeat comment posters, and the MySQL load is dropping.