Bembel-B Blog

2007/04/29

Blocking IP Addresses with Drupal Troll Module on Byethost’s Free Webspace

I’m running some Drupal site hosted by byethost.com which is more and more being overrun by spammers and harvesters. Sadly it’s not possible to block IPs with .htaccess with these free hosting plans, so I installed the Troll Module to provide IP blocking. But it was only possible to block single IPs and not whole networks. I’ve modified the Module to allow blocking whole networks, but without support for “odd” subnets.

Drupal Logo

Here’s my patch for the Drupal 4.6.x Troll Module, which might work for other versions too. I’ve submitted it on the Drupal site, so maybe it’ll be included in the official release someday.

To block all IPs 1.2.3.x for example, you’ll have to add 1.2.3 (without trailing dot!) to the IP blocking table using the Troll Module web administration pages.

Other ways I’ve tried to block spammers are not working. The great Bad Behaviour sadly isn’t working anymore since Byethost installed some transparent proxy for load balancing and caching. The Spam Module bayes filter isn’t trained enough yet. And the Spam SURBL doesn’t seem to work.
I signed in at Project Honey Pot, but I am only able to use their QuickLinks, which I’m also using on this blog. Hosting their Spam Trap scripts won’t work because of disabled PHP functions.

But for now I’m spared from those stupid spammers! :D

Advertisements

1 Comment »

  1. thnks

    Comment by Mehmet — 2008/06/21 @ 22:39 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: