Data Security and Governance
An EC2 ingestion instance has two security groups: one allows inbound SSH from a corporate CIDR, and the other allows inbound SSH from 0.0.0.0/0. Network ACLs allow the traffic. Which change restricts new SSH connections to the corporate CIDR?
Show the answer
Correct answerD. Remove the public SSH rule from the second security group.
AWhy not this: Security groups are stateful; outbound SSH rules do not control incoming SSH connections.
BWhy not this: An additional restrictive allow rule does not override a broader allow rule in another attached security group.
CWhy not this: Security groups support allow rules, not explicit deny rules.
DWhy this is right: Removing the public allow rule leaves the corporate CIDR as the only allowed SSH source.
Rules from all attached security groups are combined, so removing the public allow rule leaves only corporate SSH access. Adding another corporate allow rule does not override the existing public allow rule.