http://www.perlmonks.org?node_id=430350


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

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 :-)
  • Comment on Re^2: CGI: Validate access based on IP - with CIDR support

Replies are listed 'Best First'.
Re^3: CGI: Validate access based on IP - with CIDR support
by runrig (Abbot) on Feb 13, 2005 at 20:05 UTC
    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.