> For the complete documentation index, see [llms.txt](https://docs.acecloud.ai/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acecloud.ai/knowledge-base/kubernetes/how-to-manage-security-group-rules.md).

# How to Manage Security Group Rules?

### a. How to View Security Group Rules?

To view security group rules, follow the steps given below:

**Step 1:** [Login](https://customer.acecloud.ai/app/login) to your account.

**Step 2:** Navigate to **Kubernetes** and then click on **K8s Security Groups**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FYjrhyHinOArCWMcJ2AL0%2Fimage.png?alt=media&amp;token=7c9b67d2-88ab-4bc1-a4be-d162359e16bd" alt=""><figcaption></figcaption></figure>

**Step 3:** Click on the kebab menu next to the security group for which you want to view security group rules, and click **Manage Rules**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FWZWFb5pTcrmyqaJxHt3V%2Fimage.png?alt=media&amp;token=789b0ade-43e5-46c2-a756-673614d1e85c" alt=""><figcaption></figcaption></figure>

**Step 4:** Here, you can view all your security group rules.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FjigYXDjkxvBQwzdMPZm2%2Fimage.png?alt=media&amp;token=5a258729-eb8d-44a5-9932-a02511317b60" alt=""><figcaption></figcaption></figure>

### b. How to Create a Security Group Rule?

**Step 1**: On the Manage Rules page, click **Create Security Group Rule**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FfB8It6spPhWgSJP4tb2K%2Fimage.png?alt=media&amp;token=d0772ab8-784b-4ffd-bc1e-db10fbd35891" alt=""><figcaption></figcaption></figure>

**Step 2**: In the **Add Security Group Rule** dialog box, configure the required rule settings.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2F451WhGizvNM58bnxCOf0%2Fimage.png?alt=media&amp;token=63a9e359-ec58-4f40-b550-e43633725d99" alt=""><figcaption></figcaption></figure>

| Parameter              | Description                                                                                                                         |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Direction**          | Specifies the traffic flow for the rule. Select **Ingress** to allow incoming traffic or **Egress** to allow outgoing traffic.      |
| **Protocol**           | Select the network protocol for the rule.                                                                                           |
| **Ether Type**         | Specifies the IP version for the rule. Select **IPv4** or **IPv6**.                                                                 |
| **CIDR**               | Enter the IP address range in CIDR notation to which the rule applies (for example, `192.168.1.0/24` or `0.0.0.0/0`).               |
| **Minimum Port Range** | Specifies the starting port number for the rule. Leave blank if the selected protocol does not require ports.                       |
| **Maximum Port Range** | Specifies the ending port number for the rule. For a single port, enter the same value in both the minimum and maximum port fields. |
| **Description**        | Enter an optional description to help identify the purpose of the security group rule.                                              |

**Step 3**: Click **Add Rule** to create the security group rule.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2Fm6gnzN6JcyCyUDWyYJC9%2Fimage.png?alt=media&amp;token=53f942bd-3495-4537-9fe8-c5cb9afd2c5e" alt=""><figcaption></figcaption></figure>

***Note:** Ensure that the CIDR range, protocol, and port range are configured correctly to allow only the required network traffic while maintaining the security of your Kubernetes environment.*

### c. How to Delete a Security Group Rule?

**Step 1**: Locate the required security group, click the Kebab (⋮) menu under the Actions column, and select Manage Rules.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FGbK1JAIEvpB1wc4wrUH8%2Fimage.png?alt=media&amp;token=5726dafe-2c99-42d9-ac53-90ab7b6104fe" alt=""><figcaption></figcaption></figure>

**Step 2**: On the Manage Rules page, select either the Inbound Rules or Outbound Rules tab, depending on the rule you want to delete.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2F5l5YNQ7CblwGlL2XHsXD%2Fimage.png?alt=media&amp;token=f2d7a201-a454-443d-805c-b2ebe64bc7a0" alt=""><figcaption></figcaption></figure>

**Step 3**: Locate the required rule, click the Kebab (⋮) menu next to the rule, and select **Delete**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2Fybm4CbIi19XgwaGhvJ7E%2Fimage.png?alt=media&amp;token=6986aba2-cd8e-46a1-b231-0e6bf2b4e92a" alt=""><figcaption></figcaption></figure>

**Step 4**: In the confirmation dialog, click **Delete** to remove the security group rule permanently.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FgHrBQjNA2N9KFYBGkJyK%2Fimage.png?alt=media&amp;token=3eeb46e0-abf3-484a-9897-c338a4a0240d" alt=""><figcaption></figcaption></figure>

***Note:** Deleting a security group rule is permanent and cannot be undone. Ensure that the rule is no longer required before confirming the deletion.*
