Table of Contents

Self Service Rules

Rama Sadhu Updated by Rama Sadhu

This feature helps the customers to create the custom rules in a self-service mode.

The following demo gives more details about self service rules:

Custom Rule Categories 

  1. Click on the Custom Rule Categories button. 
  2. The total number of customer rules applied to the site is displayed. 
  3. Use the search bar to find the specific rule. 

Parameter 

Description 

Category 

The rule name is displayed here. 

Rule ID 

Once the rule is created successfully, an ID will be assigned to the rule automatically. 

Description 

The information about the rule which is entered by rule creator is displayed here. 

Added by 

The rule creator's official mail address will be displayed here. 

Impact type 

Rule impact such as Critical, High, Medium are displayed. 

Fail Safe Range 

Fail safe range of the rule in percentage value is given here. 

Action 

An action will be assigned by the rule creator, and the assigned action will be displayed. 

Status 

A toggle button is given in this field and a user can enable or disable the rule  

Modify/Delete 

Edit and Delete buttons are given to modify or edit the rules. 

A maximum of 10 custom rules can be created for the premium type of site and 2 custom rules for advance and advance plus plan type.

Product Walkthrough
Create Custom Rules

Step 1: Rule Basic Details 

This field consists of basic details of the rule. 

  • Enter the rule name and description in the respective fields. 
  • Enter a value in the fail safe range field. 
  • Add the applications in Rule Coverage field to apply the rule.
Fail safe range use case 
  • The number entered in the Fail Safe Range field is calculated by percentage. 
  • Consider a user enters “10” in the field, selects the triggered condition as Geo Block/Allow Criteria > Block request from selected countries, selected the list of countries need to be blocked. 
  • As per the above condition, failsafe move the rule to log only mode if the percentage of requests blocked by the rule is greater than 10% of all requests received by WAF/ Origin Server.
  • A check box has also been given in the failsafe range field. The checkbox is to ensure that the rule is always ON, so it cannot go back to log only mode automatically. 
  • Once the checkbox is enabled, the user cannot enter the failsafe range value and it automatically shows 100. 
Rule Trigger Condition 

The section is equipped with three different criteria. 

  1. Geo Block/Allow Criteria 
  2. IP Block/ Allow Criteria 
  3. Custom Rule 
 Geo Block/Allow Criteria 

 

Based on this criterion, user can allow or block the request from the selected country/ countries. 

There are two conditions given in this criterion.  

C1: Block requests from selected countries 

C2: Allow request ONLY from the selected countries (Block all other countries) 

Select the respective condition based on the requirement and use the drop-down menu in the “Countries Selected” field to add the country/ countries and then click on the Create Button. 

IP Block/ Allow Criteria 

 Based on this criterion, user can allow, block, or whitelist the selected IPs. 

There are three conditions given in this criterion. 

  1. Allow requests ONLY from the selected IP addresses (Block all others). 
  2. Block all requests from selected IP addresses. 
  3. Whitelist selected IP addresses. 

Select the respective condition, enter the IP address, and then add the remarks. 

+Add IP” button is given to add multiple IP addresses. 

Once the IPs successfully added, click on the Create button.  

Custom Rule 

Based on this criterion, user can create a rule for multiple parameters such as URI, USER AGENT, HTTP METOD, HTTP REFERRER, and ARGs. 

For every parameter rule action is given and users can select the rule action accordingly. 

For URIs: 

For URIs multiple operators are given, that is URI starts with, does not start with, ends with, does not end with, contains, does not contain, equals, and does not equals. 

In the request parameter field select URI and in operator field select the operator, and then enter the value in comparing value field.

For IPs:

Users can enter multiple IP addresses by comma separated format or by uploading a CSV file that contains all the list of IP addresses. 

IP referrer consists of two operators, those are “Equal To and Does not Equal To”. 

In comparing value field, users can enter multiple IPs by comma separated format or by uploading a CSV file.

Click on the “Add From File” to upload the CSV file. 

Also, click “Download Sample File Format” to see the structure of entering IPs in the CSV file. 

 

For User Agents: 

For user agents four operators are given:  

  1. Start With 
  2. Does not Equal to 
  3. Contain 
  4. Does not Contain 

In the request parameter field select USER AGENT and in operator field select the operator, and then enter the comparing value. 

Users can enter multiple values by in Comparing value field using comma separated format. 

Case Study:

A user enters two values in comparing value field such as chrome/116.0.0.0 safari 537.36 and chrome 117.0.0.0 safari/537.36, and the operator selected is Contains. 

If any one of the values match with the user agent or both the values matches with multiple user agents, then the rule trigger condition will be activated.  

Comparing values will be considered individually.

For HTTP Referrer: 

For HTTP Referrer multiple operators are given, that is URI starts with, does not start with, ends with, does not end with, contains, does not contain, equals, and does not equals to. 

In the request parameter field select HTTP Referrer and in operator field select the operator, and then enter the comparing value. 

For HTTP Method: 

For HTTP Methods two operators are given, one is “Equals to” and second is “Does not Equals to.” 

In the request parameter field select HTTP Method and in operator field select the operator, and then select the http method in comparing value field. 

In this case, any HTTP request will be checked if the selected methods are used, if the methods are found, the rule action is triggered. 

For ARGS: 

For ARGS four operators are given, those are Starts with, Ends with, Contains, Equals to. 

In the request parameter field select ARGS and in operator field select the operator, and then enter the value in comparing value field.

 

Click on the “+Add more” match to add multiple parameters.  
If a user selects ARGS method, other parameters cannot be selected. 
A maximum of 3 parameters can be added for one rule. 
 Rule Action 

 

This section is available only for the Custom rule Criterion. 

Also, the rule action list is the same for all the parameters except ARGS method. 

A rule can only have 1 action irrespective of the number of conditions added to match a request. 

 

Actions for rules with conditions URI, USER AGENT, HTTP METHODS, HTTP REFERRER: 

  1. Whitelist Request and Log 
  2. Skip Rule Category (Whitelist Rule) and Log 
  3. Skip Rule and Log 
  4. Log only 
  5. Block Request and Log 

Rule Action for rules with ARGS condition: 

Select “Skip Rule for Selected ARG”   

In the Whitelisted Rules field drop-down menu select the rules and then click on the Create button. 

How to Change a Specific Rule to Log Only Mode? 

  1. Enter the basic details of the rule in Step 1. 
  2. Rule trigger condition in Step 2 is not required. 
  3. From Step 3 Rule Action, select the rule “Move Rule to Log Only”. 
  4. The rule Move Rule to Log Only set another rule to Log Only mode. 
  5. Also, use Search Rule field to identify the target rule easily.
Irrespective of the rule trigger condition if the rule is triggered, the target rule will be moved to log only mode.  
Default Rule 

 Default rules do not need any rule trigger condition.  

Three different rule actions available such as: 

  1. Skip Rule 
  2. Skip Rule Category 
  3. Move rule to log only
The rules skipped for the corresponding requests won’t be added to the attack logs.

How did we do?

Restricted Admin User

Configuring Custom Error Page in AppTrana

Contact

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply.