new: utility function to check ip ranges