> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Firewalls

Firewalls let you control incoming network traffic to your bare metal servers and container instances by defining security rules.

## Access Firewalls

1. Click "**Firewalls**" in the left sidebar under the "Networking" section

<img src="https://mintcdn.com/gmicloud/C_oWKvRRJe0Ppct5/assets/sidebar-firewalls-navigation.png?fit=max&auto=format&n=C_oWKvRRJe0Ppct5&q=85&s=7204a60be98649f72416346995362ef4" alt="sidebar-firewalls-navigation.png" width="3024" height="1442" data-path="assets/sidebar-firewalls-navigation.png" />

2. You will see the Firewalls list page showing all your firewall configurations. The **Associate Bare Metal** and **Associated Containers** columns show how many instances each firewall is attached to.

<img src="https://mintcdn.com/gmicloud/4bKHcorHjG5NZU1D/assets/firewalls-list-page.png?fit=max&auto=format&n=4bKHcorHjG5NZU1D&q=85&s=85e21f826587c99e195c155f366b9480" alt="firewalls-list-page.png" width="3024" height="1442" data-path="assets/firewalls-list-page.png" />

## Create a Firewall

1. Click the "**Create Firewall**" button in the top right corner
2. Fill in the firewall configuration form:

<img src="https://mintcdn.com/gmicloud/4bKHcorHjG5NZU1D/assets/firewalls-create-form.png?fit=max&auto=format&n=4bKHcorHjG5NZU1D&q=85&s=c16a8551e8f29de50761f3790671ae76" alt="firewalls-create-form.png" width="3024" height="1442" data-path="assets/firewalls-create-form.png" />

### Configuration Fields

| Field           | Description                                               |
| --------------- | --------------------------------------------------------- |
| **Data Center** | Select the data center where the firewall will be created |
| **Name**        | Enter a name for your firewall                            |
| **Description** | Optional description for the firewall                     |

### Inbound Rules

Inbound rules control incoming traffic to the attached instances. Each rule consists of:

| Field          | Description                                                                  |
| -------------- | ---------------------------------------------------------------------------- |
| **Type**       | The type of traffic (e.g., SSH, HTTP, HTTPS, Custom)                         |
| **Protocol**   | Network protocol (TCP, UDP, ICMP)                                            |
| **Port Range** | The port range to allow (e.g., 22-22 for SSH)                                |
| **Sources**    | IP addresses or CIDR blocks allowed to connect (e.g., 0.0.0.0/0 for all IPs) |

Click "**Add Rule**" to add additional inbound rules.

3. Click "**Create**" to create the firewall

<Note>
  You can attach instances during creation, or at any time afterwards via the **Manage** page — see the next section.
</Note>

## Associate a Firewall with Instances

A firewall can be associated with either **Bare Metal** servers or **Container** instances. The list page shows the current counts in the **Associate Bare Metal** and **Associated Containers** columns.

<img src="https://mintcdn.com/gmicloud/ee-whETWdXVc2yI-/assets/firewall-list-associated-containers.png?fit=max&auto=format&n=ee-whETWdXVc2yI-&q=85&s=1f7dc557be0b9334d4958a9665445a17" alt="firewall-list-associated-containers.png" width="3024" height="1440" data-path="assets/firewall-list-associated-containers.png" />

1. On the Firewalls list page, click the **firewall name** (e.g., `All Open`) to open its detail page
2. On the detail page, click the "**Manage**" button in the top right corner

<img src="https://mintcdn.com/gmicloud/ee-whETWdXVc2yI-/assets/firewall-detail-manage-button.png?fit=max&auto=format&n=ee-whETWdXVc2yI-&q=85&s=d413d0cfacaed24356553018bd315e70" alt="firewall-detail-manage-button.png" width="3024" height="1440" data-path="assets/firewall-detail-manage-button.png" />

3. On the Manage page you will see two sections: **Bare Metal Association** and **Associate to Container**

<img src="https://mintcdn.com/gmicloud/ee-whETWdXVc2yI-/assets/firewall-manage-container-association.png?fit=max&auto=format&n=ee-whETWdXVc2yI-&q=85&s=4ab3a5b7f457ffaf6c76364abd53565e" alt="firewall-manage-container-association.png" width="3024" height="1440" data-path="assets/firewall-manage-container-association.png" />

4. Click the dropdown of the section you want and select one or more instances (only instances in the **same data center** as the firewall are listed)

<img src="https://mintcdn.com/gmicloud/ee-whETWdXVc2yI-/assets/firewall-manage-container-dropdown.png?fit=max&auto=format&n=ee-whETWdXVc2yI-&q=85&s=1a3648f2bb2b236dd4dcd23f7249112e" alt="firewall-manage-container-dropdown.png" width="3024" height="1440" data-path="assets/firewall-manage-container-dropdown.png" />

5. Click "**Save**" to apply the association

<Note>
  The **All Open** preset firewall allows all inbound traffic (`0.0.0.0/0`) — useful for testing, but not recommended for production workloads. Use a stricter custom firewall for instances that are exposed to the internet.
</Note>

## Disassociate a Firewall from an Instance

To remove an instance from a firewall, use the same Manage page:

1. On the Firewalls list page, click the firewall name to open its detail page
2. Click "**Manage**" in the top right corner
3. In the **Bare Metal Association** or **Associate to Container** section, locate the chip for the instance you want to disassociate and click the "**×**" icon on that chip

<img src="https://mintcdn.com/gmicloud/ee-whETWdXVc2yI-/assets/firewall-manage-disassociate-chip.png?fit=max&auto=format&n=ee-whETWdXVc2yI-&q=85&s=fa725e758b7799be555bf1804ef46d2a" alt="firewall-manage-disassociate-chip.png" width="3024" height="1440" data-path="assets/firewall-manage-disassociate-chip.png" />

4. Click "**Save**" to apply the change

After saving, the instance's **Associated Firewall** returns to whatever default applies (for example, containers fall back to the system default). The firewall itself remains allocated and can be associated with other instances.

## Manage Firewalls

From the Firewalls list page, you can:

* **View details** — click the firewall name to inspect its rules and associations
* **Edit rules** — open the detail page and update inbound rules
* **Associate / Disassociate** instances — use the Manage page (see above)
* **Delete firewall** — from the detail page; only firewalls with no associated instances can be deleted
