Courseiva
Implementing VPC InstanceseasyMultiple ChoiceObjective-mapped

PCNE Implementing VPC Instances Practice Question

A developer is configuring a Compute Engine VM to host a web server. They want to ensure that only HTTP (port 80) and HTTPS (port 443) traffic from the internet is allowed. Which firewall rule should they create?

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

Ingress allow rule for TCP ports 80 and 443 from 0.0.0.0/0.

For web server traffic, you need ingress rules that allow TCP on ports 80 and 443 from source 0.0.0.0/0. The target should be the VM (by tag or service account). A single rule can specify multiple ports.

Answer analysis

Option-by-option breakdown

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

  • Egress allow rule for TCP ports 80 and 443 to 0.0.0.0/0.

    Why it's wrong here

    Ingress, not egress, is needed for incoming web traffic.

  • Ingress deny rule for all ports except 80 and 443.

    Why it's wrong here

    Firewall rules are allow by default; you should use an allow rule. Deny rules are not recommended as primary control.

  • Egress deny rule for all ports.

    Why it's wrong here

    This would block all outbound traffic, not relevant.

  • Ingress allow rule for TCP ports 80 and 443 from 0.0.0.0/0.

    Why this is correct

    This allows incoming HTTP/HTTPS traffic from any source.

About these practice questions

Courseiva writes every PCNE question from scratch — 961 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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 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.