Add a network ACL Deny for the port and source IP to block the suspicious traffic
Short answer
A Add a network ACL Deny for the port and source IP to block the suspicious traffic while keeping the app available.
Question
Key Takeaways
NACLs support explicit Deny and are evaluated before security groups, so a Deny for the port+source IP stops the suspicious traffic while the instance stays available to legitimate users. Removing the port from the SG inbound rules (B) would also block legitimate users; security groups cannot Deny (C is invalid); a new NACL denying all egress from the instance (D) would break the app's own outbound traffic. A is correct.
A single EC2 instance is getting suspicious traffic on an open TCP port from an external source, and the app must stay available to others. Security groups are stateful and can only allow (no explicit deny), so the precise block is a network ACL Deny rule for that port and source IP on the instance's subnet—stateless and immediate, and scoped to one instance so other users are unaffected.
Common mistake: Editing the security group to remove the port (B)—that blocks all inbound on that port, including legitimate users, violating 'app must remain available.' Trying to add a Deny in a security group (C)—security groups are allow-only, they have no deny entries. Creating a new NACL that denies all egress (D) breaks the instance's outbound traffic. A is the targeted control.
Expert Analysis
Why the Answer Is Correct
A network ACL is stateless and supports explicit Deny rules, so adding a Deny for the suspicious source IP and port on the subnet NACL blocks that traffic immediately. Because it is scoped to the port and source, legitimate users on other ports or sources are unaffected, and the instance stays available—meeting both requirements.
Why the Other Options Are Wrong
B removes the port from the SG inbound rules, which would also cut off legitimate users of that port, violating availability. C proposes a Deny entry in a security group, but security groups are stateful allow-only and have no deny rules. D creates a new NACL denying all egress from the instance, which would break the application's own outbound communication. A is correct.
Community Comment Notes
Community voted A (100). Commenters noted it is a single instance, so an NACL Deny for the port and source IP will not impact other workloads, and that security groups cannot deny. A confirmed.
Official Reference
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
TareDHakim 👍 1 Answered Athe question indicates it is a single instance on the network so no other workloads will be impacted.
-
div05jkjl 👍 1A is the answer
-
imymoco 👍 1I vote D
-
VPNalumni 👍 1Agree A
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.