You can import an exported security group rule file to a security group to quickly create or restore security group rules.
- Log in to Security Group Console, enter the security group management page.
- On the security group management page, choose Region, and locate the security group to which you want to import rules.
- Click the ID or name of the security group to enter the security group rule page.
- On the security group rule page, click the Inbound Rules or Outbound Rules tab based on the direction (inbound or outbound) of the security group rules to be imported.
- On the Inbound Rules or Outbound Rules tab page, click Import Rules.
- In the Batch Import-Inbound/Outbound Rules window that appears, select the edited template inbound or outbound rule file and click Import.
- If security group rules already exist in the security group to which you want to import rules, we recommend that you export these rules first. Otherwise, the imported rules will overwrite the existing ones.
- If no security group rule exists in the security group to which you want to import rules, we recommend that you first download the template file, edit the template file, and then import the file.