Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By IamPter on
How do I block an entire range of IP addresses with the Troll Module? Something like 66.61.0.0 - 66.61.255.255.
Or do I have to do each one individually?
Comments
Blocking IP Ranges with htaccess
I don't know how to do this with the troll module (I have never used that module), but in case it helps, you can achieve what you want using your .htaccess file. Here is an example using the range you specified:
or a more narrow range:
There are many tutorials on the web for using rewriting in htaccess if you're not familiar with this technique.
It's a good idea to comment these in your .htaccess so you can remember later why you did it.
HTH,
Dan
Thanks. I know how to do it
Thanks. I know how to do it via htaccess. Just wanted to handle it with the troll module.