Help Center> Web Application Firewall> User Guide> Policy Management> Adding Rules to One or More Policies
Updated on 2024-04-17 GMT+08:00

Adding Rules to One or More Policies

This topic describes how to add rules to one or more policies.

If you have enabled enterprise projects, ensure that you have all operation permissions for the project where your WAF instance locates. Then, you can select the project from the Enterprise Project drop-down list and configure protection policies for the domain names in batches.

Prerequisites

A website has been added to WAF.

Constraints

If Enterprise Project is set to All projects, no rules can be added to a policy.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the management console and select a region or project.
  3. Click in the upper left corner and choose Web Application Firewall under Security & Compliance.
  4. In the navigation pane on the left, choose Policies.
  5. (Optional) If you have enabled enterprise projects, ensure that you have all operation permissions for the project where your WAF instance locates. Then, you can select the project from the Enterprise Project drop-down list and configure protection policies for the domain names in batches.

    If Enterprise Project is set to All projects, no rules can be added to a policy.

  6. In the upper left corner of the policy list, click View All My Rules.
  7. In the upper left corner above a list of a type of rule, click Add Rule.
  8. Select one or more policies from the Policy Name drop-down list.

    Figure 1 Adding a rule to one or more policies

  9. Set other parameters.

    • To add a CC attack protection rule, see Table 1.
    • To add a precise protection rule, see Table 1.
    • To add a blacklist or whitelist rule, see Table 1.
    • To add a geolocation access control rule, see Table 1.
    • To add a WTP rule, see Table 1.
    • To add an information leakage prevention rule, see Table 1.
    • To add a global protection whitelist rule, see Table 1.
    • To add a data masking rule, see Table 1.

  10. Click Confirm.

Related Operations

  • After a rule is added, the rule is Enabled by default. To disable it, click Disable in the Operation column of the target rule. You can also select multiple rules and click Disable above the rule list to disable them all together.
  • To modify a rule, locate the row that contains the rule and click Modify in the Operation column. You can also select multiple rules and click Modify above the list to modify them all together.
  • To delete a rule, locate the row that contains the rule and click Delete in the Operation column. You can also select multiple rules and click Delete above the list to delete them all together.
  • To enable multiple rules, select them and click Enable above the list.