# How to configure a WAF Custom Allowed Rule

import DocButton from '~/components/webkit/DocButton.vue';


Configuring a **WAF Custom Allowed Rule** allows you to instantiate specific rules for the needs of your application. These rules permit specific, legitimate traffic while maintaining robust protection against malicious attacks.

This guide explains how to configure a WAF Custom Allowed Rule via Azion Web Platform.

<DocButton href="/en/documentation/products/secure/firewall/web-application-firewall/custom-allowed-rules/" label="go to Custom Allowed Rules reference" kind="secondary" size="medium" />

---

## Requirements

To instantiate Custom Allowed Rules in a WAF Rule Set, you must have:

- A [firewall](/en/documentation/products/guides/secure/firewall-configure-main-settings/) with the Web Application Firewall module activated.
- A configured [WAF Rule Set](/en/documentation/products/guides/secure/create-waf-rule-set/).

---

## Configuring a WAF Custom Allowed Rule

1. Access [Azion Console](/en/documentation/products/guides/how-to-access-azion-console/) > **WAF Rules** in **Edge Libraries**.
2. Create a [new WAF Rule Set](/en/documentation/products/secure/firewall/web-application-firewall/rules-set/) or select an existent one.
3. Select the **Allowed Rules** tab.
4. Click the **+ Allowed Rule** button. 
5. Select the **Rule ID** you want to use.
    - Check the list of all [available internal rules](/en/documentation/products/secure/firewall/web-application-firewall/rules-set/).
6. Type a description to explain the reason this rule was allowed.
7. In the **Match Zone Set** section configure the behavior that should be used to allow a rule:
    - In **Path**, configure the behavior that should be used to allow a rule. Example: `/api/v1/resources/*`.
    - In **Match Zones**, select the part of the request to match such as headers, body, etc.
        - According to the option, you could complete additional fields to add a specific value representing the match option and the matches for the value or the key name. Read more about [Allowed Rules fields](/en/documentation/products/secure/firewall/web-application-firewall/#allowed-rules).
    - If necessary, activate the **Regex** switch to treat conditional fields as regular expressions in all match zones. 
8. Enable the **Status** switch.
9. Click the **Save** button.

:::tip
You can configure a Custom Allowed Rule based on the WAF Tuning records. Consult the guide on [How to tune WAF](/en/documentation/products/guides/secure/tune-waf/) for more information.
:::