Courseiva
easyMultiple ChoiceObjective-mapped

PCSE Practice Question: Your organization has a VPC with several subnets…

Your organization has a VPC with several subnets hosting Compute Engine instances. You need to allow SSH access (port 22) to instances in the 'management' subnet from the internet, but only from the office's static IP range (203.0.113.0/24). All other ingress traffic to that subnet should be blocked. Which firewall rule configuration should you create?

⚠ Common exam trap

Google Cloud often tests the misconception that you need both an allow rule and a separate deny rule to block other traffic, but in Google Cloud VPC, the implicit deny all ingress rule already blocks everything not explicitly allowed, so only the allow rule is required.

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

Create an ingress rule with target tag 'management', source IP range 203.0.113.0/24, protocol tcp:22, action allow

It creates an ingress firewall rule that explicitly allows TCP port 22 traffic from the office's static IP range (203.0.113.0/24) to instances tagged 'management'. In Google Cloud VPC firewall rules, the default action is to deny all ingress traffic unless an allow rule matches, so this single allow rule satisfies the requirement: only SSH from the office IP range is permitted, and all other ingress is implicitly blocked.

Answer analysis

Option-by-option breakdown

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

  • Create an ingress rule with target tag 'management', source IP range 0.0.0.0/0, protocol tcp:22, action allow

    Why it's wrong here

    Allows SSH from all sources, not just office.

  • Create an ingress rule with target tag 'management', source IP range 203.0.113.0/24, protocol tcp:22, action deny

    Why it's wrong here

    Denies SSH from office, opposite of requirement.

  • Create an ingress rule with target tag 'management', source IP range 203.0.113.0/24, protocol tcp:22, action allow

    Why this is correct

    Correct: Targets the subnet's instances via tag, allows SSH only from office IP.

  • Create an ingress rule with target tag 'management', source IP range 203.0.113.0/24, protocol all, action allow

    Why it's wrong here

    Allows all traffic from office, not just SSH.

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

About these practice questions

One of 960 original PCSE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCSE 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 PCSE exam.