Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Importing and Exporting Security Group Rules

Updated on 2024-04-18 GMT+08:00

Scenarios

You can configure security group rules in an Excel file and import the rules to the security group. You can also export security group rules to an Excel file.

You can import and export security group rules in the following scenarios:

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

Notes and Constraints

  • The security group rules to be imported must be configured based on the template. Do not add parameters or change existing parameters. Otherwise, the import will fail.
  • If Source of a security group rule to be imported is IP address group, ensure that the IP address group exists and its name and ID are correct. You must specify the IP address group in the format of IP address group name[IP address group ID]. An example is ipGroup-test[96a8a93f-XXX-d7872990c314].
  • If Source of a security group rule to be imported is Security group, ensure that the security group exists and its name and ID are correct. You must specify the security group in the format of Security group name[Security group ID]. An example is sg-test[96a8a93f-XXX-d7872990c314].
  • If a security group rule to be imported is the same as an existing one, the security group rule cannot be imported. You can delete the rule and try again.

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. On the security group list, click the name of the target security group.

    The security group details page is displayed.

  5. 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: Inbound rules control incoming traffic to instances in the security group.
      • Outbound: Outbound rules control outgoing traffic from instances in the security group.

      Inbound

      Protocol & Port

      The network protocol used to match traffic in a security group rule. The value can be All, TCP, UDP, GRE, and ICMP.

      TCP

      Destination port used to match traffic in a security group rule. The value can be from 1 to 65535.

      Inbound rules control incoming traffic over specific ports to instances in the security group.

      Outbound rules control outgoing traffic over specific ports from instances in the security group.

      22, or 22-30

      Type

      Source IP address version. You can select:
      • IPv4
      • IPv6

      IPv4

      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. If you select IP address for Source, you can enter multiple IP addresses in the same IP address box. Each IP address represents a different security group rule.
      • 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

      sg-test[96a8a93f-XXX-d7872990c314]

      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: If you select IP address for Destination, you can enter multiple IP addresses in the same IP address box. Each IP address represents a different security group rule.

      sg-test[96a8a93f-XXX-d7872990c314]

      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.

      -

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback