A security group is a stateful virtual firewall capable of filtering. As an important means for network security isolation provided by Tencent Cloud, it can be used to set network access controls for one or more TencentDB instances. Instances with the same network security isolation demands in one region can be put into the same security group, which is a logical group. TencentDB and CVM share the security group list and are matched with each other within the security group based on rules. For specific rules and limitations, please see Security Group Overview.
- TencentDB security groups currently only support network access control for VPCs but not the classic network.
- As TencentDB does not have active outbound traffic, outbound rules are not applicable to TencentDB.
- TencentDB for MongoDB security groups support primary instances, read-only replicas, and disaster recovery instances.
- TencentDB for MongoDB supports the security group feature which is implemented based on the allowlist. To use this feature, please submit a ticket.
Log in to the CVM console.
Select Security Group on the left sidebar, select a region, and click New.
In the pop-up dialog box, configure the following items and click OK.
|Open all ports||All ports are open. May present security issues.||-|
|Open ports 22, 80, 443, and 3389 and the ICMP protocol||Ports 22, 80, 443, and 3389 and the ICMP protocol are opened to the internet. All ports are opened to the private network.||This template does not take effect for TencentDB.|
|Custom||You can create a security group and then add custom rules. For detailed directions, please see "Step 2. Add a security group rule" below.||-|
On the Security Group page, click Modify Rules in the Operation column on the row of the security group for which to configure a rule.
On the security group rule page, click Inbound rule > Add Rule.
In the pop-up dialog box, set the rule.
|Source or Target||Description|
|A single IPv4 address or an IPv4 range||In CIDR notation, such as |
|A single IPv6 address or an IPv6 range||In CIDR notation, such as |
|ID of the referenced security group. You can reference the ID of:|
|Reference an IP address object or IP address group object in a parameter template.||-|
To connect to TencentDB for MongoDB, port 27017 must be opened.
A security group is an instance-level firewall provided by Tencent Cloud for controlling inbound/outbound traffic of TencentDB. You can associate a security group with an instance when purchasing it or later in the console.
Currently, security groups can be configured only for TencentDB for MongoDB instances in VPC.
- If there are existing rules in the security group, export them before importing new rules. Existing rules are overwritten after importing.
- If there are no existing rules in the security group, download a template and edit it before importing it.