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.
Security group rules are imported or exported to an Excel file.
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.
Parameter |
Description |
Example Value |
---|---|---|
Direction |
The direction in which the security group rule takes effect.
|
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 |
The source of the security group rule. The value can be a single IP address or a security group to allow access from the IP address or instances in the security group. For example:
|
0.0.0.0/0 |
Destination |
The destination of the security group rule. The value can be a single IP address or a security group to allow access to the IP address 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 >). |
- |
Last Modified |
The time when the security group was modified. |
- |