# Attach Security Groups to Instance

> The **Attach Security Groups** to Instance function allows you to define inbound and outbound traffic rules applied to a virtual machine. It acts as a virtual firewall to control network access at the instance level.

The **Attach Security Groups** to Instance function allows you to define inbound and outbound traffic rules applied to a virtual machine. It acts as a virtual firewall to control network access at the instance level.

### Attach Security Groups to Instance {#attach-security-groups-to-instance}

1. Navigate to `Project > Identity > Projects`, choose desired project, then hover to `More`.

   ![/assets/compute/ins-more.png](/assets/compute/ins-more.png)

2. Hover over `Related Resources` in the drop-down menu, then click `Manage Security Group`.

   ![/assets/compute/ins_sg_1.png](/assets/compute/ins_sg_1.png)

3. Choose Virtual Adapters and Security Groups. Click `OK` button to proceed.

   ![/assets/compute/ins_sg_2.png](/assets/compute/ins_sg_2.png)

<!-- 4. Notification of attaching result will appear on top right.

   ![/assets/compute/ins_sg_3.png](/assets/compute/ins_sg_3.png) -->
