QuestionQ53

VerifiedSecuring communications and establishing boundary protection

You have an application whose frontend runs in a managed instance group in subnet A, while its data layer is stored on a MySQL Compute Engine virtual machine (VM) in subnet B within the same VPC. Subnet A and subnet B each contain several other Compute Engine VMs. You want to allow only the application frontend to access the data on the application's MySQL instance through port 3306.

What should you do?

Explanation

A VPC ingress firewall rule can use a source service account and a target service account, restricting TCP port 3306 traffic to VM instances using the frontend service account and to the MySQL VM using its distinct service account. This excludes the unrelated VMs in both subnets; a subnet source range or tags assigned to every VM in a subnet would not.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!