doc-exports/docs/vpc/umn/vpc_SecurityGroup_0007.html
Qin Ying, Fan 38a9f4a4f1 VPC UMN 20230106 version
Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2023-06-14 19:36:52 +00:00

10 KiB

Importing and Exporting Security Group Rules

Scenarios

  • If you want to quickly create or restore security group rules, you can import existing rules to the security group.
  • If you want to back up security group rules locally, you can export the rules to an Excel file.
  • If you want to quickly apply the rules of one security group to another, or if you want to modify multiple rules of the current security group at once, you can import or export existing rules.

Notes and Constraints

  • When modifying exported security group rules, you can only modify existing fields in the exported file based on the template and cannot add new fields or modify the field names. Otherwise, the file will fail to be imported.
  • Duplicate rules are not allowed.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Click in the upper left corner and choose Network > Virtual Private Cloud.
  4. In the navigation pane on the left, choose Access Control > Security Groups.
  5. On the Security Groups page, click the security group name.
  6. Export and import security group rules.
    • Click to export all rules of the current security group to an Excel file.
    • Click to import security group rules from an Excel file into the current security group.
      Table 1 describes the parameters in the template for importing rules.
      Table 1 Template parameters

      Parameter

      Description

      Example Value

      Direction

      The direction in which the security group rule takes effect.

      • Inbound rules control incoming traffic to cloud resources in the security group.
      • Outbound rules control outgoing traffic from cloud resources in the security group.

      Inbound

      Protocol & Port

      Protocol: The network protocol. Currently, the value can be All, TCP, UDP, ICMP, GRE, or others.

      TCP

      Port: The port or port range over which the traffic can reach your ECS. The value ranges from 1 to 65535.

      22, or 22-30

      Source

      Source of the security group rule. The value can be an IP address or a security group to allow access from IP addresses or instances in the security group. For example:
      • IP address:
        • Single IP address: 192.168.10.10/32
        • All IP addresses: 0.0.0.0/0
        • IP address range: 192.168.1.0/24
      • Security group: sg-A

      0.0.0.0/0

      Destination

      Destination of the security group rule. The value can be an IP address or a security group to allow access to IP addresses or instances in the security group. For example:

      0.0.0.0/0

      Description

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

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

      -