On 06/06/13 14:51, Roger wrote:
Hi all Our Drupal 7 site is under constant attack from the Chinese. In Rails there is an easy way to redirect pretty much anything off site or to other page/s not in the system and hide the url.
Also is there a better way of hiding the url of user login
I have tried to set up Rules in Drupal 7 to simply redirect [Page not found] responses back to the front page or better still out of the Drupal 7 system completely. I've had no success.
Can someone please direct me on how to set up such a Rule on our site.
Thanks in advance Roger
In my case, I want to hide only the register page from undesirables.
I installed the ip2country module, enabled it, disabled it. It doesn't actually work properly, but I like its data.
Then I use a trivial custom module to use the ip2country data to discover whether the anonymous visitor is in Australia. If not, they're redirected to / with a short message.
I've not looked into it, but I expect it's equally simple to assign a role, "nice_user" to everyone you do like based on the country or IP address-range and authorise nice_user to the lowest level you allow to post comments or whatever, maybe including use of contact forms. Authorised users can view, nice_users can post.
I don't like the idea of banning single IP addresses, I'm more likely to ban /24 networks, supposing that makes it harder to get a new IP address, but making it relatively unlikely ban nice users.