Question 996 of 1,000
Implementing network securitymediumMultiple ChoiceObjective-mapped

Default VPC Security Group SSH Rule Evaluation

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. A key principle to apply: vPC Firewall Rules. 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.

Exhibit

gcloud compute firewall-rules list --format="table(name, network, direction, priority, sourceRanges, allowed, denied)"
NAME           NETWORK  DIRECTION  PRIORITY  SOURCE_RANGES    ALLOWED          DENIED
allow-http     default  INGRESS    1000      0.0.0.0/0        tcp:80
deny-ssh       default  INGRESS    100       10.0.1.0/24      tcp:22
default-allow-ssh default INGRESS 65535     0.0.0.0/0        tcp:22
allow-internal default  INGRESS    65535     10.0.0.0/8       all

Refer to the exhibit. A VM in the default VPC with an internal IP 10.0.1.2 tries to SSH (tcp:22) from a host at 10.0.2.5. What is the result?

Exhibit

gcloud compute firewall-rules list --format="table(name, network, direction, priority, sourceRanges, allowed, denied)"
NAME           NETWORK  DIRECTION  PRIORITY  SOURCE_RANGES    ALLOWED          DENIED
allow-http     default  INGRESS    1000      0.0.0.0/0        tcp:80
deny-ssh       default  INGRESS    100       10.0.1.0/24      tcp:22
default-allow-ssh default INGRESS 65535     0.0.0.0/0        tcp:22
allow-internal default  INGRESS    65535     10.0.0.0/8       all

Quick Answer

The answer is that the SSH traffic is allowed because it matches the allow-internal rule. In the default VPC, the default security group includes an implicit rule that permits all inbound traffic from other resources within the same security group, regardless of subnet. Since both the VM at 10.0.1.2 and the host at 10.0.2.5 are associated with this default security group, the SSH connection on TCP port 22 is permitted before any deny rules are even evaluated. On the Google Professional Cloud Network Engineer exam, this scenario tests your understanding of security group stateful evaluation order and the default VPC’s built-in intra-group allow rule—a common trap is assuming that different subnets or IP ranges automatically block traffic. Remember the key tip: in the default security group, internal is always allowed, so think “same group, same pass.”

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

The traffic is allowed because it matches the allow-internal rule.

In Google Cloud VPC, firewall rules are stateful and evaluated based on priority (lower priority number = higher priority). The default VPC includes an 'allow-internal' rule (priority 65534) that allows all TCP traffic from any source in the 10.0.0.0/8 range. Since the source IP (10.0.2.5) is within 10.0.0.0/8 and the destination VM (10.0.1.2) is also in that range, the SSH traffic matches this allow rule. If a deny-ssh rule were present with a lower priority number (e.g., 1000), it would take precedence over the allow-internal rule. However, no such deny rule is specified in the question, so the traffic is allowed because it matches the allow-internal rule.

Key principle: VPC Firewall Rules

Answer analysis

Option-by-option breakdown

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

  • The traffic is denied because the source IP is not in the same subnet as the VM.

    Why it's wrong here

    No such rule by default.

  • The traffic is denied because the deny-ssh rule has a lower priority number and blocks all SSH traffic.

    Why it's wrong here

    deny-ssh does not match because source is 10.0.2.5, not 10.0.1.0/24.

  • The traffic is denied due to the implicit deny rule at the end.

    Why it's wrong here

    Implicit deny applies only if no allow rule matches; here an allow rule matches.

  • The traffic is allowed because it matches the allow-internal rule.

    Why this is correct

    allow-internal allows all traffic from 10.0.0.0/8.

    Related concept

    VPC Firewall Rules

Common exam traps

Common exam trap: answer the scenario, not the keyword

A common misconception in Google Cloud is that VPC firewall rules are evaluated in order (like ACLs), but they are actually evaluated by priority number (lower number = higher priority). In this question, the allow-internal rule (priority 65534) matches the traffic. If a more specific deny rule existed (e.g., priority 1000), it would take precedence. Since no such deny rule is present, the traffic is allowed. Another trap is assuming the implicit deny blocks traffic, but implicit deny only applies if no allow rule matches.

Detailed technical explanation

How to think about this question

In cloud VPCs like AWS, security groups are stateful and evaluate rules based on the most permissive match; the order of rules does not matter because all allow rules are evaluated before any deny. The default security group typically has a self-referencing rule that allows all traffic from other instances in the same group, which is why 10.0.2.5 can SSH to 10.0.1.2 even across subnets. This behavior differs from traditional firewalls where rule order is critical, and it prevents accidental blocking of inter-instance communication within the same security group.

KKey Concepts to Remember

  • VPC Firewall Rules
  • Default VPC
  • Priority
  • Implicit Deny

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

VPC Firewall Rules

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

What to study next

Got this wrong? Here's your next step.

Review vPC Firewall Rules, then practise related PCNE questions on the same topic to reinforce the concept.

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 — VPC Firewall Rules.

What is the correct answer to this question?

The correct answer is: The traffic is allowed because it matches the allow-internal rule. — In Google Cloud VPC, firewall rules are stateful and evaluated based on priority (lower priority number = higher priority). The default VPC includes an 'allow-internal' rule (priority 65534) that allows all TCP traffic from any source in the 10.0.0.0/8 range. Since the source IP (10.0.2.5) is within 10.0.0.0/8 and the destination VM (10.0.1.2) is also in that range, the SSH traffic matches this allow rule. If a deny-ssh rule were present with a lower priority number (e.g., 1000), it would take precedence over the allow-internal rule. However, no such deny rule is specified in the question, so the traffic is allowed because it matches the allow-internal rule.

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

Review vPC Firewall Rules, then practise related PCNE questions on the same topic to reinforce the concept.

What is the key concept behind this question?

VPC Firewall Rules

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

Keep practising

More PCNE practice questions

Last reviewed: Jun 30, 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.