---
title: "Copy security group"
sidebar_label: "Copy security group"
sidebar_position: 2
description: "How to copy a security group"
---

import Formbricks from '@theme/MDXComponents/Formbricks';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import { TabItemLabel } from '@selectel/docux/components';
import MoreVerticalIcon from '@selectel/docux/icons/more-vertical';
import CreateRuleIngress from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/cloud-servers/security-groups/create-rule-ingress.mdx';
import CreateRuleEgress from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/cloud-servers/security-groups/create-rule-egress.mdx';

# Copy security group

When copying, you select the source group from which you want to copy rules, and the destination group to which the rules will be copied. You can create a new group as the destination group or choose an existing one.

All rules of the source group are copied; it is not possible to select specific rules. If the source and destination groups are in different pools, only rules allowing traffic from an IP address or subnet will be copied. Rules allowing traffic from other security groups will not be copied.

After copying, you can [delete any rules](/cloud-servers/security-groups/manage-rules/delete-rule.mdx) in the target group and [create new ones](/cloud-servers/security-groups/manage-rules/create-rule.mdx).

When copying to an existing group, rules created before the copy operation will be preserved.

<Tabs queryString="copy-group">
  <TabItem value="new">
    <TabItemLabel>
      Copy to a new group
    </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. In the menu of the  source security group, select **Copy rules to group**.<MoreVerticalIcon />

    4. Select the [location](/infrastructure/locations.mdx) where the target security group will be created.

    5. Select the target security group — **New security group**.

    6. Click **Copy**. A security group named `<security_group_name>-copy` will be created in the selected pool, where `<security_group_name>` is the name of the source group.
  </TabItem>

  <TabItem value="existing">
    <TabItemLabel>
      Copy to an existing group
    </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. In the menu of the  source security group, select **Copy rules to group**.<MoreVerticalIcon />

    4. Select the [location](/infrastructure/locations.mdx) where the target security group is located.

    5. Select a target security group.

    6. Click **Copy**.
  </TabItem>
</Tabs>

<Formbricks />
