Question
- Can we add subnets with CIDR format to the iRules data tables?
Environment
- WAF
- iRules
- data-tables
Answer
- Yes, you can add subnets in this format like e.g X.X.X.X/Y
class match works: -
class match [<options>] <item> <operator> <class>
class match
class match [<options>] <item> <operator> <class>
- class match attempts to match the provided <item> to an element in <class> by applying the <operator> to the <item>. The return value depends on the option specified. If no option was specified, the return value is 1 for a match and 0 for a no-match. See discussion below regarding options.
-
This command form is equivalent to the obsolete iRule command:
-
matchclass <item> <operator> <class>
-
-
Example:
-
class match [HTTP::uri] ends_with image_class
-
read as, does the URI end with an element from image_class.
-
-
Example:
-
class match [IP::client_addr] equals client_ip_class
-
read as, does the client IP address exist in the client_ip_class.
-