Updated on 2024-03-05 GMT+08:00

Creating a Security Group

Scenarios

A security group is a collection of access control rules to control the traffic that is allowed to reach and leave the cloud resources that it is associated with. The cloud resources can be cloud servers, containers, databases, and more. A security group consists of inbound and outbound rules.

Notes and Constraints

If you have not created any security groups yet, the system automatically creates a default security group for you and associates it with the instance (such as an ECS) when you create it.

The default security group name is default. For details, see Default Security Group.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and choose Network > Virtual Private Cloud.

    The Virtual Private Cloud page is displayed.

  3. In the navigation pane on the left, choose Access Control > Security Groups.

    The security group list is displayed.

  4. In the upper right corner, click Create Security Group.

    The Create Security Group page is displayed.

  5. Configure the parameters as prompted.
    Table 1 Parameter description

    Parameter

    Description

    Example Value

    Name

    Mandatory

    Enter the security group name.

    The security group name can contain a maximum of 64 characters, which may consist of letters, digits, underscores (_), hyphens (-), and periods (.). The name cannot contain spaces.

    NOTE:

    You can change the security group name after a security group is created. It is recommended that you give each security group a different name.

    sg-AB

    Description

    Optional

    Supplementary information about the security group. This parameter is optional.

    The security group description can contain a maximum of 255 characters and cannot contain angle brackets (< or >).

    N/A

  6. Confirm the inbound and outbound rules of the template and click OK.