---
title: "Delete a rule from a security group"
sidebar_label: "Delete a rule"
sidebar_position: 2
description: "How to delete a rule from a security group"
---

import Formbricks from '@theme/MDXComponents/Formbricks'

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import MoreVerticalIcon from '@selectel/docux/icons/more-vertical'
import {TabItemLabel} from '@selectel/docux/components'

# Delete a rule from a security group

:::warning

The rule will stop being effective — traffic that was allowed by this rule will be denied. Active sessions on ports that were established according to this rule will be interrupted.

:::

:::warning

Do not delete rules in the [default security group](/cloud-servers/security-groups/about-security-groups.mdx#default-security-group) (the group named `default`), if a Managed Kubernetes cluster is running in the project and pool of this group. Any changes to the group may lead to cluster failures.

:::

<Tabs queryString="delete-rule">
  <TabItem value="panel">
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/security-groups), on the top menu, click **Products** and select **Cloud Servers**.

    2. Go to the **Security Groups** section.

    3. Open the security group page.

    4. Depending on the traffic direction the rule applies to, open the **Ingress** or **Egress** tab.

    5. In the <MoreVerticalIcon /> rule menu, select **Delete rule**.

    6. Click **Delete**.
  </TabItem>

  <TabItem value="openstack5">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).
    2. Delete the rule:

       ```bash
       openstack security group rule delete <rule>
       ```

       Specify `<rule>` — the rule ID. You can view the list of rules using the `openstack security group rule list <security_group>;`.
  </TabItem>
</Tabs>

<Formbricks />
