Support for role based IP restriction

Helmut Neubauer - March 22, 2008 - 22:45
Project:Restrict Login Access by IP Address
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:peligrorice
Status:needs review
Description

I'd like to limit access for roles by ip or a range of ips

#1

peligrorice - April 2, 2008 - 19:57
Title:Support roles» Support for role based IP restriction
Assigned to:Anonymous» peligrorice

A good feature, shouldn't be too hard to implement

#2

bentterp - October 9, 2008 - 12:25

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

peligrorice - March 25, 2009 - 02:01
Status:active» postponed

#4

dmjossel - May 22, 2009 - 03:26

Too bad this is postponed-- seems to me to be an extremely useful feature, one I'm actually looking for.

#5

panthar - August 18, 2009 - 22:41

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!

AttachmentSize
restrict_by_ip.tar_.gz 13.74 KB

#6

panthar - August 18, 2009 - 23:26
Version:5.x-1.0-beta4» 6.x-1.x-dev

Sorry, still new to this, did not realize this was posted originally as 5.x, this feature addition is for 6.x!

#7

panthar - August 18, 2009 - 23:27
Status:postponed» needs review

#8

msumme - September 25, 2009 - 00:03

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

dmjossel - October 12, 2009 - 05:33

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

dmjossel - October 12, 2009 - 07:30

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 128

Uninstalling/reinstalling and running update.php had no effect.

UPDATE: A second round of uninstalling and reinstalling did it. Not sure why.

 
 

Drupal is a registered trademark of Dries Buytaert.