Configure network access to a MySQL sync cluster
By default, in clusters with a public subnet, connection is allowed for all IP addresses provided you have a login and password.
For a cluster in a private subnet, connection is allowed from the cluster subnet and from subnets that are connected to the cluster subnet via a cloud router.
You can define a list of allowed IP addresses from which access to the Managed Database cluster will be allowed.
You can also use security groups to restrict access to the Managed Database cluster.
Any changes to network access settings are the client's responsibility.
Define a list of allowed IP addresses
When restoring a cluster from a backup, the list of allowed IP addresses is not preserved — you will need to re-enter allowed IP addresses for the new cluster.
- In the Dashboard, on the top menu click Products and select Managed Databases.
- Open the Active tab.
- Open the database cluster page → Settings tab.
- In the Network access management block, click the Allowed addresses and subnet CIDRs field.
- At the bottom of the drop-down list, enter the subnet CIDR or the IP address from which access to the cluster should be allowed. Only IPv4 addressing is supported.
- Click .
- Repeat steps 5 and 6 for all allowed IP addresses.
- Click Save. Connection will be denied to all IP addresses except those specified in the allow list.
Security groups in a Managed Database cluster
A security group in a Managed Database cluster is a set of rules for filtering incoming and outgoing cluster traffic. For security groups to work, traffic filtering (port security) must be enabled on the network.
If filtering is enabled on the network, a default security group is assigned to all ports in that network, which allows all traffic through the ports. You can assign a different security group when creating a cluster or in an existing cluster.
In addition to the security groups you select when creating a cluster, a service security group is automatically assigned to the Managed Database cluster network ports. This group keeps the cluster running and cannot be changed or deleted. The service group is only visible in the OpenStack CLI and Terraform.
Read more about security groups in the Security Groups section.
Assign a security group to an existing cluster
Once the group is assigned, all active sessions that do not comply with the group rules will be terminated.
-
Ensure that traffic filtering (port security) is enabled on the cluster network. To check this, in the Dashboard menu, click Products → Cloud Servers → Network → Private networks or Public networks tab. Networks with enabled filtering are marked with .
If filtering is disabled, to use security groups, create a new cluster in a new subnet or a subnet with traffic filtering enabled and migrate data using an SQL dump.
-
In the Dashboard, on the top menu click Products and select Managed Databases.
-
Open the Active tab.
-
Open the database cluster page → Settings tab.
-
In the Security block, click Edit.
-
Select the security group you want to assign to all ports in the cluster network.
-
Click .