Courseiva
Network Security, Compliance and GovernanceeasyMultiple ChoiceObjective-mapped

ANS-C01 Network Security, Compliance and Governance Practice Question

A company has a VPC with public and private subnets. The public subnet hosts a web server that must be accessible from the internet. The private subnet hosts a database that should only be accessible from the web server. Which security group configuration should be used?

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

Database security group: inbound rule allowing traffic from the web server security group on the database port

Security groups can reference other security groups as sources. Option A is correct because it allows traffic from the web server's security group, which ensures only the web server can access the database. Option B is wrong because it allows all traffic from the VPC CIDR, which is too permissive. Option C is wrong because it allows traffic from a specific private IP, but that IP might change and is less flexible than using the security group. Option D is wrong because it allows traffic from 0.0.0.0/0, which permits inbound traffic from any IP address, making the database publicly accessible.

Answer analysis

Option-by-option breakdown

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

  • Database security group: inbound rule allowing traffic from the web server security group on the database port

    Why this is correct

    This ensures only the web server can reach the database.

  • Database security group: inbound rule allowing traffic from the VPC CIDR on the database port

    Why it's wrong here

    Allows any resource in the VPC, including potential compromised instances.

  • Database security group: inbound rule allowing traffic from the web server's private IP on the database port

    Why it's wrong here

    If the web server is replaced or scaled, IP changes; referencing security group is better.

  • Database security group: inbound rule allowing traffic from 0.0.0.0/0 on the database port

    Why it's wrong here

    It allows traffic from any IP (0.0.0.0/0) on the database port, which is overly permissive and insecure. The database should only be accessible from the web server security group.

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 1,621 original ANS-C01 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 ANS-C01 practice question is part of Courseiva's free Amazon Web Services 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 ANS-C01 exam.