CLOUD-NETWORK practice question 23 of 30
In your project my-project, you have two subnets in a Virtual Private Cloud (VPC): subnet-a with IP range 10.128.0.0/20 and subnet-b with IP range…
Full set: 233 questionsThe most secure and precise method to control traffic between specific groups of VMs is to use service accounts for both the source and target in a firewall rule. This approach ties the rule to the cryptographic identity of the VMs, not to mutable network tags or less specific IP ranges. Option B correctly creates an ingress firewall rule on the database servers (identified by sa-db) that allows traffic on the standard MySQL port (TCP 3306) only from application servers (identified by sa-app). This directly implements the principle of least privilege.
A. Using a network tag for the source is less secure than using a service account, as tags are simple metadata and not a verifiable identity.
C. This rule is overly restrictive and uses the wrong source IP range (10.128.0.0/20 is the database subnet, not the application subnet).
D. This rule is incorrect because it uses the wrong source IP range (10.128.0.0/20). Traffic from the application servers (in 172.16.0.0/24) would never match.
1. Google Cloud Documentation, "VPC firewall rules," in Virtual Private Cloud. This document states, "You can configure firewall rules based on service accounts... Using service accounts for the target and the source... is a more secure method than using tags for the target and source."
2. Google Cloud Documentation, "Firewall rules details," section "Source and target filtering by service account." This section confirms that you can specify both --source-service-accounts and --target-service-accounts to create identity-based rules.
3. Google Cloud Documentation, "gcloud compute firewall-rules create." The command reference shows the usage of --source-service-accounts and --target-service-accounts flags.
Keep practicing
Take the free CLOUD-NETWORK practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CLOUD-NETWORK practice questions
- Question 1You are configuring the final elements of a migration effort where resources have been mo…
- Question 2You recently configured Google Cloud Armor security policies to manage traffic to your ap…
- Question 3You want to create a service in GCP using IPv6. What should you do?
- Question 4You work for a multinational enterprise that is moving to GCP. These are the cloud requir…
- Question 5You have a storage bucket that contains two objects. Cloud CDN is enabled on the bucket, …
- Question 6You want to establish a dedicated connection to Google that can access Cloud SQL via a pu…
