I’ve recently had figure out an issue with the Restrict by IP Module for Drupal 6.x – (restrict_by_ip 6.x-3.x-dev). After a lot of investigation I discovered that the login issue related to how the module deals with the CIDR representation of a single IP address.
For example – using just one IP address – the format of x.x.x.x was be x.x.x.x/32
This format worked correctly for one of the IP addresses being used – but refused to play ball for another similar IP address (y.y.y.y/32). This second, non-functional IP address was validated using a number of different IP to CIDR utilities – as a /32 – at this stage I was beginning to tear my remaining hair out.
So then I started to actually debug the CIDR validation that is actually carried out in the module itself. I found that my working ip (x.x.x.x/32) was being validated correctly. At times like this – every developer knows you have to try everything – in this case i changed y.y.y.y/32 to y.y.y.y/31 – bingo.