Question 405 of 1,705
Network Security, Compliance and GovernancehardMultiple ChoiceObjective-mapped

Quick Answer

The answer is an unauthorized EC2 instance launched with the same Web security group attached. This is correct because security group referencing works by allowing traffic from any resource that has the referenced security group assigned, regardless of whether that resource is authorized or not. When the DB SG’s inbound rule references the Web SG, it effectively grants port 3306 access to every instance—both legitimate and rogue—that carries that security group. On the AWS Certified Advanced Networking Specialty ANS-C01 exam, this scenario tests your understanding that security group references are identity-based, not IP-based, and that they do not validate the source instance’s purpose or ownership. A common trap is assuming network ACLs or stateful filtering cause the issue, but the real vulnerability lies in the implicit trust of the security group reference itself. Memory tip: think of a security group reference as a “keycard” that opens a door for anyone wearing the same badge, not just the intended person.

ANS-C01 Network Security, Compliance and Governance Practice Question

This ANS-C01 practice question tests your understanding of network security, compliance and governance. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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 has a VPC with a public subnet hosting a web server and a private subnet hosting a database. The web server must connect to the database on port 3306. Security groups are configured: Web SG allows inbound HTTP/HTTPS from 0.0.0.0/0 and outbound to DB SG on port 3306. DB SG allows inbound from Web SG on port 3306. Network ACLs are default. The web server can connect to the database, but the security team notices that the database is also receiving connections from an unexpected IP address. What is the MOST likely cause?

Clue words in this question

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

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1hardmultiple choice
Study the full ACL explanation →

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

An unauthorized EC2 instance has been launched with the same Web security group attached.

Option D is correct because the DB SG inbound rule allows traffic from the Web SG, which includes all instances with that SG, but if the Web SG is also attached to other instances (like an unauthorized instance), those instances can connect. Option A is wrong because NACLs are default allow. Option B is wrong because the DB SG does not have an inbound rule from 0.0.0.0/0. Option C is wrong because stateful nature does not cause unexpected connections.

Key principle: Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.

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 network ACL on the private subnet allows inbound traffic from all IPs.

    Why it's wrong here

    Wrong: NACLs are default allow, but the issue is about SG.

  • The DB security group has an inbound rule allowing traffic from 0.0.0.0/0 on port 3306.

    Why it's wrong here

    Wrong: The rule allows only from Web SG.

  • An unauthorized EC2 instance has been launched with the same Web security group attached.

    Why this is correct

    Correct: Any instance with Web SG can access DB due to the inbound rule.

    Clue confirmation

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

    Related concept

    CIDR notation defines the prefix length.

  • Security groups are stateful, so the DB SG automatically allows inbound responses.

    Why it's wrong here

    Wrong: Statefulness does not allow new inbound connections.

Common exam traps

Common exam trap: usable hosts are not the same as total addresses

Subnetting questions often tempt you into counting all addresses. In normal IPv4 subnets, the network and broadcast addresses are not usable host addresses.

Detailed technical explanation

How to think about this question

Subnetting questions test whether you can identify the network, broadcast address, usable range, mask and correct subnet. Slow down enough to calculate the block size correctly.

KKey Concepts to Remember

  • CIDR notation defines the prefix length.
  • Block size helps identify subnet boundaries.
  • Network and broadcast addresses are not usable hosts in normal IPv4 subnets.
  • The required host count determines the smallest suitable subnet.

TExam Day Tips

  • Write the block size before choosing the subnet.
  • Check whether the question asks for hosts, subnets or a specific address range.
  • Do not confuse /24, /25, /26 and /27 host counts.

Key takeaway

Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.

Real-world example

How this comes up in practice

A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.

What to study next

Got this wrong? Here's your next step.

Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related ANS-C01 subnetting questions on CIDR, address ranges, and subnet selection.

Related practice questions

Related ANS-C01 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 ANS-C01 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 ANS-C01 question test?

Network Security, Compliance and Governance — This question tests Network Security, Compliance and Governance — CIDR notation defines the prefix length..

What is the correct answer to this question?

The correct answer is: An unauthorized EC2 instance has been launched with the same Web security group attached. — Option D is correct because the DB SG inbound rule allows traffic from the Web SG, which includes all instances with that SG, but if the Web SG is also attached to other instances (like an unauthorized instance), those instances can connect. Option A is wrong because NACLs are default allow. Option B is wrong because the DB SG does not have an inbound rule from 0.0.0.0/0. Option C is wrong because stateful nature does not cause unexpected connections.

What should I do if I get this ANS-C01 question wrong?

Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related ANS-C01 subnetting questions on CIDR, address ranges, and subnet selection.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

CIDR notation defines the prefix length.

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

3 more ways this is tested on ANS-C01

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 company has a VPC with multiple security groups. An EC2 instance in security group A needs to communicate with an RDS instance in security group B on port 3306. The security team wants to minimize exposure. What should the inbound rule in security group B be?

hard
  • A.Allow inbound TCP 3306 from the CIDR block of the subnet where the EC2 instance resides
  • B.Allow inbound TCP 3306 from 0.0.0.0/0
  • C.Allow inbound TCP 3306 from the private IP address of the EC2 instance
  • D.Allow inbound TCP 3306 from security group A

Why D: Option C is correct because referencing security group A as source allows traffic from any instance associated with security group A, which is the most specific and secure. Option A is wrong because it allows traffic from any instance in the VPC (0.0.0.0/0). Option B is wrong because it allows traffic from the entire subnet. Option D is wrong because it allows traffic from the instance's IP, but if the instance is replaced, the IP may change.

Variation 2. A company has a VPC with a public subnet and a private subnet. They have a web server in the public subnet and a database in the private subnet. The web server needs to communicate with the database on port 3306. Security groups are configured as follows: Web server SG allows inbound HTTP/HTTPS from 0.0.0.0/0 and outbound to database SG on port 3306. Database SG allows inbound from web server SG on port 3306. However, the web server cannot connect. Network ACLs are default. What is the issue?

medium
  • A.The network ACL on the private subnet denies inbound traffic on port 3306.
  • B.Security groups are stateful, so no outbound rule is needed; the issue is something else.
  • C.The web server security group does not allow outbound traffic to the database.
  • D.The database security group inbound rule is not correctly referencing the web server security group ID.

Why D: Option C is correct because the web server's security group outbound rule explicitly allows traffic to the database SG, which is correct. The issue is likely that the database SG inbound rule is not referencing the correct web server SG, or the web server SG is not attached to the web server. Option A is wrong because NACLs are default allow. Option B is wrong because the web server SG outbound is correctly configured. Option D is wrong because stateful nature means inbound allows outbound responses, but the issue is the inbound rule on the database SG.

Variation 3. 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?

easy
  • A.Database security group: inbound rule allowing traffic from the web server security group on the database port
  • B.Database security group: inbound rule allowing traffic from the VPC CIDR on the database port
  • C.Database security group: inbound rule allowing traffic from the web server's private IP on the database port
  • D.Database security group: inbound rule allowing traffic from 0.0.0.0/0 on the database port

Why A: Security groups can reference other security groups as sources. Option A is correct because it allows traffic from the web server's security group. Option B is wrong because it allows all traffic from the VPC CIDR, which is too permissive. Option C is wrong because it allows all inbound traffic. Option D is wrong because it allows traffic from the web server but not specifically via its security group.

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