Posted by Helmut Neubauer on March 22, 2008 at 10:45pm
| Project: | Restrict Login or Role Access by IP Address |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | james_g |
| Status: | closed (fixed) |
Issue Summary
I'd like to limit access for roles by ip or a range of ips
Comments
#1
A good feature, shouldn't be too hard to implement
#2
Would be very useful to me as well, i.e. Admins and Superadmin only access through VPN :-D
Except, I'd want to run version 6.current....
#3
#4
Too bad this is postponed-- seems to me to be an extremely useful feature, one I'm actually looking for.
#5
Here we go, I did it! Role based ip restriction!!
It needs review, but it would be really cool if we could add this to the core.
If you currently have restrict by ip installed, FULLY uninstall it, as the database table will change. After re-installing see the readme.txt as you have to add 1 line to the settings.php to override the drupal session functions.
Hope this works out for everyone, and hope I can become a co-maintainer in the near future!
Thanks!
#6
Sorry, still new to this, did not realize this was posted originally as 5.x, this feature addition is for 6.x!
#7
#8
I also think this feature would be incredibly useful. It would make it very easy to sell to a client, so that you could tell them their superadmin and special roles with privileges will be secure from password theft. If they try to log in from elsewhere, or an imposter does, they won't be able to use the site. This would keep the site much more secure if it's managed from a central network.
This would be an AWESOME feature, because it would still allow lesser roles to participate and get usernames on the site.
#9
Would it be possible to restrict only the registration of a role within an IP block?
While currently this is good as an extra level of protection for admin access, it's not so good for other roles.
For instance, at an ISP, this would allow the automatic assignation of the "client" role to users within a certain IP range.
However, once registered, that user account should be a "client" even when they are accessing the site from another location.
#10
Also, use of the module modified for restricting role access produces this error:
Warning: Unknown column 'rip.rid' in 'field list' query: select rip.rid, rip.restrict_by_ip_address from restrict_by_ip rip left join users_roles ur ON ur.rid = rip.rid where ur.uid = 1 in /usr/share/drupal6/includes/database.mysql.inc on line 128Uninstalling/reinstalling and running update.php had no effect.
UPDATE: A second round of uninstalling and reinstalling did it. Not sure why.
#11
The primary reason for having to uninstall/reinstall is that there is a database modification. I am not certain why it would take uninstalling/reinstalling twice, but if it does the trick, then awesome.
The thought has crossed my mind to make a new project specifically for restricting ip by roles, since this maintainer has not responded to me for several months. What do you guys think?
#12
It's obvious that even though I've attempted to make time, I haven't been able to work on features. Would you like to be added as a contributor, or to take over maintenance?
#13
I definitely want to be a contributor, and I can certainly help maintain, although would rather it be a co-maintenance thing between the two of us.
Thanks.
#14
@#5 you'll want to provide a patch, as that's easier to test.
#15
This was added in 6.x-2.x and further modified/improved in 6.x-3.x.