# Cách sử dụng WAF trên HI GIO Portal

## <mark style="color:green;">**Tổng quan**</mark> <a href="#overview" id="overview"></a>

Tài liệu này hướng dẫn cách sử dụng WAF trên HI GIO Portal để bảo vệ các dịch vụ ảo của bạn khỏi các cuộc tấn công và chủ động ngăn chặn các mối đe dọa.

1. *Cấu hình Quy tắc Allowlist cho Dịch vụ Ảo (Virtual Service)*
2. *Chỉnh sửa WAF Signatures cho Virtual Service*

## <mark style="color:green;">Quy trình</mark> <a href="#id-2.-guidance" id="id-2.-guidance"></a>

{% tabs %}
{% tab title="I. Cấu hình Quy tắc Allowlist cho Dịch vụ Ảo (Virtual Service)" %}
{% hint style="info" %}
Bạn có thể sử dụng tính năng allowlist để xác định các điều kiện khớp và hành động liên quan mà WAF sẽ thực hiện khi xử lý yêu cầu.
{% endhint %}

**Bước 1**: Đăng nhập vào HI GIO portal, chọn **Networking** > **Edge Gateways** > Chọn **tên Edge Gateway** từ thanh điều hướng bên trái chính.

<figure><img src="/files/iPFajiK3o3INw3WH4826" alt=""><figcaption></figcaption></figure>

**Bước 2**: Chọn **Virtual Services >** Nhấn vào tên dịch vụ ảo trong menu Load Balancer.

<figure><img src="/files/iH2qcB1ViHwCIqk5CPWG" alt=""><figcaption></figcaption></figure>

**Bước 3**: Chọn tab **WAF > Allowlist Rules > NEW** để tạo quy tắc mới.

<figure><img src="/files/r8TGPpDt2mXpcfZbamsw" alt=""><figcaption></figcaption></figure>

**Bước 4**: Nhập tên quy tắc > Để kích hoạt quy tắc khi tạo, bật công tắc **Active** > Chọn tiêu chí khớp > Chọn hành động cần áp dụng khi có sự khớp > Nhấn **Add**.

<figure><img src="/files/zX8xtiJiZWyK43xMkrrm" alt=""><figcaption></figcaption></figure>

| **Tiêu chí khớp** | **Mô tả**                                                                                                                                                                                                                                                                                                                                                             |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Client IP Address | <ol start="1"><li>Chọn <strong>Is</strong> hoặc <strong>Is Not</strong> để xác định liệu có thực hiện hành động nếu địa chỉ IP của khách hàng khớp hoặc không khớp với giá trị bạn nhập.</li><li>Nhập một địa chỉ IPv4, địa chỉ IPv6, một dải địa chỉ, hoặc một ký hiệu CIDR.</li><li>(Tùy chọn) Để thêm các địa chỉ IP khác, nhấn <strong>Add IP</strong>.</li></ol> |
| HTTP Method       | <ol start="1"><li>Chọn <strong>Is</strong> hoặc <strong>Is Not</strong> để xác định liệu có thực hiện hành động nếu phương thức HTTP khớp hoặc không khớp với giá trị bạn nhập.</li><li>Từ menu thả xuống, chọn một hoặc nhiều phương thức HTTP.</li></ol>                                                                                                            |
| Path              | <ol start="1"><li>Nhập một chuỗi đường dẫn.</li></ol><p>Đường dẫn không cần bắt đầu với dấu gạch chéo (/).</p><ol start="2"><li>(Tùy chọn) Để thêm các đường dẫn khác, nhấn <strong>Add Path</strong>.</li></ol>                                                                                                                                                      |
| Host Header       | <ol start="1"><li>Chọn một tiêu chí cho host header.</li><li>Nhập một giá trị cho header.</li></ol>                                                                                                                                                                                                                                                                   |

| **Hành động**  | **Mô tả**                                                                                                                                   |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Bypass         | WAF không thực thi thêm bất kỳ quy tắc nào và yêu cầu sẽ được phép.                                                                         |
| Continue       | Dừng việc thực thi allowlist và tiếp tục với việc đánh giá WAF signature .                                                                  |
| Detection Mode | <p>WAF đánh giá và xử lý yêu cầu đến nhưng không thực hiện hành động chặn. </p><p>Một mục nhập log sẽ được tạo khi yêu cầu bị đánh dấu.</p> |
| {% endtab %}   |                                                                                                                                             |

{% tab title="II. Chỉnh sửa WAF Signatures cho Virtual Service" %}
You can edit the WAF signatures for a virtual service - you can change a signature mode from Detection to Enforcement or the reverse, or, if necessary, deactivate a signature or a signature group.

**Step** **1:** In the **WAF** tab, under the **General** section > click **EDIT** to edit the WAF configuration

<figure><img src="/files/m9HRh8LmP63VoLiMyXMi" alt=""><figcaption></figcaption></figure>

**Step** **2:** Edit WAF general settings

<figure><img src="/files/S3XdcWk0YGWQFtbvNbPh" alt=""><figcaption></figcaption></figure>

| **Settings** |                                                                                                                                                                                                                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| WAF State    | Active/Deactive                                                                                                                                                                                                                                                                                  |
| Mode         | <ul><li><strong>Detection</strong>: In this mode, WAF policy will evaluate the incoming request. A log entry is created when this request is flagged.</li><li><strong>Enforcement</strong>: In this mode, WAF policy will evaluate and block the request based on the specified rules.</li></ul> |

**Step 3:** In the WAF tab, under **the Signature Groups section, you can see the signature groups** included in your WAF policy. You can see if they are actively in use or not. You can also see the number of active rules in each group and the number of rules that have been overridden manually.

<figure><img src="/files/DpQe3qAAQogmuTdEjhzt" alt=""><figcaption></figcaption></figure>

**Step 4:** Under **Signature Groups**, click the expand button on the left of the signature group you want to edit.

<figure><img src="/files/g9LgxUv0HfU5tZFFAcsq" alt=""><figcaption></figcaption></figure>

**Step 5:** To edit the signatures of a group, click **Edit Signatures** and select an action > **SAVE**.

<figure><img src="/files/oNHqP8PjMofV6B0a4QXR" alt=""><figcaption></figcaption></figure>

&#x20;
{% endtab %}
{% endtabs %}


---

# 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.higiocloud.vn/hi-gio-user-guide-vn/network/3.-load-balancer/cach-su-dung-waf-tren-hi-gio-portal.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.
