Question 451 of 497
Implementing network securitymediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is to use Identity-Aware Proxy (IAP) TCP forwarding with IAM conditions. This is the best practice because IAP TCP forwarding enables SSH access to Compute Engine instances without exposing them to the public internet, while IAM conditions allow you to restrict which specific service accounts can invoke the IAP tunnel, giving you identity-based access control rather than relying on insecure source IP rules. On the Google Professional Cloud Network Engineer exam, this scenario tests your understanding of zero-trust networking in a Shared VPC environment, where the common trap is to suggest firewall rules or VPNs instead of leveraging IAP’s integration with IAM. Remember that IAP acts as a gatekeeper at the application layer, and the IAM condition is what locks that gate to only authorized service accounts. A useful memory tip: think of IAP as the “tunnel” and IAM conditions as the “key”—without the right key, no one gets through the tunnel.

PCNE Implementing network security Practice Question

This PCNE practice question tests your understanding of implementing network security. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company uses Shared VPC with multiple service projects. The network admin wants to restrict access to certain Compute Engine instances so that only specific service accounts can SSH into them. What is the best practice to achieve this?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "best"

    Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

Question 1mediummultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use Identity-Aware Proxy (IAP) TCP forwarding with IAM conditions restricting which service accounts can use IAP.

Option B is correct because Identity-Aware Proxy (IAP) TCP forwarding allows SSH access to Compute Engine instances without exposing them to the public internet. By combining IAP with IAM conditions, the network admin can restrict which service accounts are permitted to use IAP, thereby controlling SSH access at the identity level rather than relying on source IP addresses. This approach aligns with Google Cloud's best practice for zero-trust network security.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Configure firewall rules that allow SSH only from source IP ranges of the allowed service accounts.

    Why it's wrong here

    Firewall rules filter by IP, not service account.

  • Use Identity-Aware Proxy (IAP) TCP forwarding with IAM conditions restricting which service accounts can use IAP.

    Why this is correct

    IAP provides secure access and IAM conditions allow granular control by service account.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use Organization Policies to restrict SSH access.

    Why it's wrong here

    Organization Policies are for broader constraints, not instance-level SSH control.

  • Use VPC Service Controls with a service perimeter.

    Why it's wrong here

    VPC Service Controls protect data exfiltration, not SSH access.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may confuse IAP with traditional firewall rules or VPC Service Controls, mistakenly thinking source IP filtering or perimeter-based controls can enforce identity-based access, whereas IAP is the only option that directly integrates service account identity with SSH access.

Detailed technical explanation

How to think about this question

IAP TCP forwarding works by establishing a secure tunnel from the user's device to the instance via the IAP service, which authenticates the user or service account using IAM and then proxies the TCP connection. The IAM condition can specify which service accounts are allowed to use the `roles/iap.tunnelResourceAccessor` role, enabling granular access control. This method avoids the need for public IPs on instances and eliminates the risk of IP spoofing, as access is tied to verified identities.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCNE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCNE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCNE question test?

Implementing network security — This question tests Implementing network security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use Identity-Aware Proxy (IAP) TCP forwarding with IAM conditions restricting which service accounts can use IAP. — Option B is correct because Identity-Aware Proxy (IAP) TCP forwarding allows SSH access to Compute Engine instances without exposing them to the public internet. By combining IAP with IAM conditions, the network admin can restrict which service accounts are permitted to use IAP, thereby controlling SSH access at the identity level rather than relying on source IP addresses. This approach aligns with Google Cloud's best practice for zero-trust network security.

What should I do if I get this PCNE question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "best". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on PCNE

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A developer wants to SSH into a Compute Engine instance that has no public IP. Which service should they use?

easy
  • A.Direct Peering.
  • B.Cloud NAT.
  • C.Identity-Aware Proxy (IAP) TCP forwarding.
  • D.Cloud VPN.

Why C: Identity-Aware Proxy (IAP) TCP forwarding allows secure, authenticated, and authorized SSH access to Compute Engine instances that have no public IP addresses. It works by establishing a tunnel through the IAP service, which proxies the SSH connection over HTTPS (port 443) to the instance's internal IP, eliminating the need for a public IP or bastion host.

Keep practising

More PCNE practice questions

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCNE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCNE exam.