The content of this article is about how to create a VPC type security group for ECS instances. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Create a security group
An ECS instance must belong to at least one security group. For more information, see Security Groups.
If you start creating an ECS instance without creating a security group, you can choose to use the security group we automatically created for you. For more information, see Security Group Default Rules.
You can also create a security group based on business needs and move instances into the security group. This article describes how to create a security group.
Prerequisites
If you want to create a VPC type security group, you must first manage the VPC.
Description
Security groups in VPC can span switches, but cannot span VPCs.
Operation steps
Log in to the ECS management console.
In the left navigation bar, select Network and Security > Security Groups.
Select a region.
Click to create a security group.
In the pop-up Create Security Group dialog box, complete the following configuration:
Template: According to the services that need to be deployed on the instances in the security group, select the appropriate template to simplify the security group rule configuration. As shown in the table below.
Security group name: Set the security group name as prompted on the page.
Description: Briefly describe the security group to facilitate later management.
Network type:
If it is a VPC type security group, select VPC and select the VPC that has been created.
If it is a classic network type security group, select Classic Network.
Click OK.
For the security group you created, before adding any security group rules, the default rules for both the private network and the public network are: allow all access in the outbound direction, and deny all access in the inbound direction.
Follow-up operations
After creating the security group, you must add security group rules.
You can also join or remove security groups according to business needs.
Related API
CreateSecurityGroup
The above is the detailed content of How to create a VPC type security group for an ECS instance. For more information, please follow other related articles on the PHP Chinese website!