2

Is it possible to restrict the login or role access by IP in drupal 7.Is there any module available in drupal 7 to provide similar functionality Restrict Login Any one guide me do this.

Thanks

  • If there is no current D7 method for this, I have this on my todo list, and was hoping to get it in in the next month or two. – mpdonadio Jan 24 '12 at 17:13
3

Check out the Restrict IP module. This module allows administrators to restrict access to the site to an administrator defined set of IP addresses. Anyone trying to access the site from an IP address not in the list of allowed IP addresses will be redirected to an access denied page with the message "Your address is not in the list of allowed IP addresses". No blocks will be rendered, and no javascript will be added to the page. This will happen for any and all pages these users try to access.

| improve this answer | |
1

I don't know of a module for Drupal 7.

However, you can add your IP check by implementing hook_form_alter for the login form. Just add a validate call back for your IP. See this post about some more information about hook_form_alter.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.