Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: CGI: Validate access based on IP - with CIDR support

by runrig (Abbot)
on Feb 11, 2005 at 21:03 UTC ( #430272=note: print w/replies, xml ) Need Help??


in reply to CGI: Validate access based on IP - with CIDR support

You could also do this with Net::CIDR::Lite, which might be worthwhile if you have alot of cidr addresses. You can not currently serialize the Net::CIDR::Lite object (I've been thinking of adding store/retrieve or freeze/thaw methods), but if you could, then it might be better than reading in the file every time (patches welcome!). Of course, if your method works, and works well enough, then no need to go to the trouble of changing... :-)
  • Comment on Re: CGI: Validate access based on IP - with CIDR support

Replies are listed 'Best First'.
Re^2: CGI: Validate access based on IP - with CIDR support
by nerfherder (Monk) on Feb 12, 2005 at 00:20 UTC
    Thanks for the reply! I hear you about the freeze/thaw methods - good idea. I thought that Net::CIDR::Lite had no equivalent to Net::CIDR::cidrlookup() - or does it? That's why I went with Net::CIDR, anyway.

    Any other comments are most welcome! Thanks again :-)
      I thought that Net::CIDR::Lite had no equivalent to Net::CIDR::cidrlookup()

      The 'find' method would do that. You would add all ip's and cidr addresses to the object, then do find()'s to see if an ip is within any of those ip's or cidr ranges.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://430272]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-12-06 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (32 votes). Check out past polls.

    Notices?