# Web App Firewall (WAF)

The creation of a Web Application Firewall (WAF) is a one-time process. Create a WAF in the public cloud Console, fetch the ID/ARN, and update the Plan in DuploCloud. Once updated, the WAF can be attached to the Load Balancer.

## Creating a Web Application Firewall (WAF)

When you create a WAF in DuploCloud, an entry is added to the [Web ACL](https://docs.aws.amazon.com/waf/latest/developerguide/web-acl.html). You use this entry [in a later step](#attaching-the-waf-to-a-load-balancer) to attach an ALB Load Balancer to your WAF.

1. In the DuploCloud Portal, navigate to **Administrator** -> **Plans**. The **Plans** page displays.
2. From the **Name** column, select the Plan you want to update.
3. Click the **WAF** tab.<br>

   <figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Ftjwhf5zZakE6yPhazMCV%2FWAF%20details%20new.png?alt=media&#x26;token=e5c3fb2f-1a52-47fa-ac1e-5715c4153276" alt=""><figcaption><p>The <strong>Plans</strong> page <strong>WAF</strong> tab</p></figcaption></figure>
4. Click **Add**. The **Add WAF** pane displays.

<div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FKmrOhRYilPyHx34K0fxP%2FScreenshot%20(456).png?alt=media&#x26;token=88dd83c0-fbbf-48b9-a3fb-58a40c95afaa" alt=""><figcaption><p>The <strong>Add WAF</strong> pane</p></figcaption></figure></div>

1. In the **Name** field, type the name of your WAF.
2. In the **WAF ARN** field, enter the Amazon Resource Name (ARN).
3. Optionally, enter your **WAF Dashboard URL**.
4. Click **Create**.

## Attaching the WAF to a Load Balancer

{% hint style="warning" %}
Only ALB Load Balancers can be attached to a WAF.
{% endhint %}

1. If you don't yet have an Application Load Balancer (ALB), [create one](https://docs.duplocloud.com/docs/automation-platform/overview/load-balancers#adding-a-load-balancer).
2. In the **Other Settings** card, click **Edit**. The **Other Load Balancer Settings** pane displays.<br>

   <div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FCE6TrTqPopqAHMA4kzBw%2FAWS_LB_WAF_Attach.png?alt=media&#x26;token=faf0619a-ba52-4194-92cd-ec80d49a235c" alt=""><figcaption><p><strong>Other Load Balancer Settings</strong> for attaching a WAF (via the <strong>Web ACL</strong> field) to an ALB Load Balancer<br></p></figcaption></figure></div>
3. From the **Web ACL** list box, select a [WAF that you have added to DuploCloud](#creating-a-web-application-firewall-waf).
4. Complete the other required fields in the **Other Load Balancer Settings** pane.
5. Click **Update**.

## Updating an existing WAF <a href="#id-1-toc-title" id="id-1-toc-title"></a>

1. From the DuploCloud portal, navigate to **Administrator** -> **Plans**.
2. From the **Name** column, select the Plan associated with the WAF you want to update.
3. Click the **WAF** tab.
4. Click on the menu icon (<img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FxLkcUNKntyMJKGrP7Wad%2Fmenu%20icon.png?alt=media&#x26;token=c4f245e3-80f8-4573-a7c8-7d4233e7d1be" alt="" data-size="line">) in the row of the existing WAF that you want to update, and select **Edit**. The **Update WAF&#x20;*****YOUR\_WAF\_NAME*** pane displays.<br>

   <div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FwZLScB1DjNRk01WnTm4W%2Fupdating%20WAF.png?alt=media&#x26;token=71b0143d-6620-46de-b0bf-b4be4c045cd4" alt=""><figcaption></figcaption></figure></div>
5. Update the **Name** and/or **WAF ARN**.
6. Update or add a **WAF Dashboard URL**.
7. Click **Update**. The WAF is updated.

## Analyzing inbound traffic with the WAF dashboard <a href="#id-1-toc-title" id="id-1-toc-title"></a>

DuploCloud also provides a WAF Dashboard through which you can analyze the traffic that is coming in and the requests that are blocked. The Dashboard can be accessed from the left navigation panel: **Observability** -> **WAF**.

![WAF Dashboard](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fd2EbpLaFliuMpECtVETT%2Fwaf.png?alt=media\&token=65caa08a-ce44-4bd4-a029-aafa44a33d30)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.duplocloud.com/docs/automation-platform/overview/aws-services/web-application-firewall-waf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
