Configure a classic policy
You can configure classic policies and classic expressions by using either the configuration utility or the command-line interface. A policy rule cannot exceed 1,499 characters. When configuring the policy rule, you can use named classic expressions. For more information about named expressions, see Create named classic expressions. After configuring the policy, you bind it either globally or to a virtual server.
Note that there are small variations in the policy configuration methods for various Citrix ADC features.
Note: You can embed a classic expression in a default syntax expression by using the syntax SYS.EVAL_CLASSIC_EXPR(classic_expression), specifying the classic_expression as the argument.
Create a classic policy by using the CLI
At the command prompt, type the following commands to set the parameters and verify the configuration:
- add cmp policy <name> -rule <expression> -action <action> - show cmp policy [<policyName>]
The following commands first create a compression action and then create a compression policy that applies the action:
> add cmp action cmp-act-compress compress Done > show cmp action cmp-act-compress 1) Name: cmp-act-compress Compression Type: compress Done > add cmp pol cmp-pol-compress -rule ExpCheckIp -resAction cmp-act-compress Done > show cmp pol cmp-pol-compress 1) Name: cmp-pol-compress Rule: ExpCheckIp Response action: cmp-act-compress Hits: 0 Done >
Create a policy with classic expressions by using the GUI
In the navigation pane, expand the feature for which you want to configure a policy and, depending on the feature, do the following:
- For Content Switching, Cache Redirection, and the application firewall, click Policies.
- For SSL, click Policies, and then in the details pane, click the Policies tab.
- For System Authentication, click Authentication, and then in the details pane, click the Policies tab.
- For Filter, SureConnect, and Priority Queuing, expand Protection Features, select the desired function, and then in the details pane, click the Policies tab.
- For the Citrix Gateway, expand Citrix Gateway, expand Policies, select the desired function, and then in the details pane, click the Policies tab.
For most features, click the Add button.
In the Create <feature name> Policy dialog box, in the Name* text box, enter a name for the policy.
Note: You must begin a policy name with a letter or underscore. A policy name can consist of 1 to 31 characters, including letters, numbers, hyphen (-), period (.), pound sign (#), space ( ), and underscore (_).
For most features, you associate an action or a profile. For example, you may be required to select an action, or, in the case of an Citrix Gateway or application firewall policy, you select a profile to associate with the policy. A profile is a set of configuration options that operate as a set of actions that are applied when the data being analyzed matches the policy rule.
Create an expression that describes the type of data that you want this policy to match.
Depending on the type of policy you want to create, you can choose a predefined expression, or you can create a new expression.
Named expressions are predefined expressions that you can reference by name in a policy rule.
Click Create to create your new policy.
Click Close to return to the Policies screen for the type of policy you were creating.