Help Center> Web Application Firewall> User Guide> Rule Configuration> Configuring a Web Tamper Protection Rule

Configuring a Web Tamper Protection Rule

You can configure these rules to prevent a static web page from being tampered with.

If you have enabled enterprise projects, you can select your enterprise project from the Enterprise Project drop-down list and add protection policies for the domain names in the project.

Prerequisites

A website has been added to WAF.

Constraints

It takes several minutes for a new rule to take effect. After the rule takes effect, protection events triggered by the rule will be displayed on the Events page.

Specification Limitations

This function is unavailable in the detection edition and load-balancing WAF instances.

Application Scenarios

  • Quicker response to requests

    If a web tamper protection rule is configured, WAF caches static web pages on the server. Then, when a request is received to view the page, WAF returns the page from the cache, which can be faster than retrieving it from the server.

  • Web tamper protection

    If an attacker modifies a static web page on the server, WAF still returns the cached original web page to visitors. Visitors never see the pages that were tampered with.

    WAF randomly extracts requests from a visitor to compare the page they received with the page on the server. If WAF detects that the page has been tampered with, it notifies you by SMS or email, depending on what you configure. For more details, see Enabling Alarm Notifications.

Procedure

  1. Log in to the management console.
  2. Go to the protection policy configuration page by following the steps shown in Figure 1.

    Figure 1 Access to the protection policy configuration page

  3. In the Web Tamper Protection configuration area, change Status if needed and click Customize Rule to go to the Web Tamper Protection page. Figure 2shows an example.

    Figure 2 Web Tamper Protection configuration area

  4. In the upper left corner of the Web Tamper Protection page, click Add Rule.
  5. In the displayed dialog box, specify the parameters described in Table 1. Figure 3 shows an example.

    Figure 3 Adding a web tamper protection rule
    Table 1 Rule parameters

    Parameter

    Description

    Example Value

    Domain Name

    Domain name of the website to be protected

    www.example.com

    Path

    A part of the URL, not including the domain name

    A URL is used to define the address of a web page. The basic URL format is as follows:

    Protocol name://Domain name or IP address[:Port]/[Path/.../File name].

    For example, if the URL is http://www.example.com/admin, set Path to /admin.

    NOTE:
    • The path does not support regular expressions.
    • The path cannot contain two or more consecutive slashes. For example, ///admin. If you enter ///admin, WAF converts /// to /.

    /admin

    Rule Description

    A brief description of the rule. This parameter is optional.

    None

  6. Click OK. You can view the rule in the list of web tamper protection rules.

    Figure 4 List of web tamper protection rules

Protection Effect

If your website is tampered with, an event will be displayed in the event list on the Events page.

Other Operations

  • To disable a rule, click Disable in the Operation column of the rule. The default Rule Status is Enabled.
  • To update cache of a protected web page, click Update Cache in the row containing the corresponding web tamper protection rule. If web page content has been changed, the cache for the corresponding rule needs to be updated. Otherwise, WAF will return the latest cached page that does not have the most current content.
  • To delete a rule, click Delete in the row containing the rule.