Cloud concept · Updated

Network Segmentation - Network segmentation divides a network into distinct zones and controls communication between them according to security requirements.

In short

Network segmentation separates workloads by trust level, function, environment, or data sensitivity, then permits only the traffic required between them. It reduces exposure and limits lateral movement after a compromise, but effective segmentation requires enforced traffic controls rather than merely separate address ranges.

Cloud Concepts Hub →

6 key aspects of Network Segmentation

Effective segmentation combines requirement-driven boundaries, least-privilege traffic rules, controlled routing, and ongoing validation.

01
Security zones based on requirements

Group workloads by trust level, business function, environment, or data sensitivity. Define required flows before choosing subnet layouts or connectivity services.

02
Least-privilege communication

Permit only necessary sources, destinations, protocols, and ports between zones. Separate subnets or address ranges do not provide this restriction without enforced controls.

03
North/south and east/west protection

Control traffic crossing environment boundaries as well as traffic moving between internal workloads. Internet-facing protections alone do not prevent lateral movement.

04
Explicit routing and isolation

Use route tables and gateways to establish intended paths and remove unintended connectivity. Distinguish direct internet access, outbound access through NAT, and isolated subnets with no internet route.

05
Layered enforcement

Combine workload-level filtering, subnet controls, and inspection where requirements justify them. Account for stateful versus stateless behavior and ensure traffic cannot bypass required inspection.

06
Continuous validation

Test that required connections succeed and prohibited connections fail. Review flow logs and configuration changes to detect overly broad permissions, routing errors, and unintended connectivity.

Cloud services for Network Segmentation

Amazon VPC supplies the network boundaries and local traffic controls, while AWS Transit Gateway manages connectivity between multiple networks. Transit gateway route tables can keep groups of networks separated and direct selected flows toward an inspection VPC. AWS Network Firewall inspects traffic only when routing places its endpoints in the traffic path. AWS PrivateLink offers service-specific private connectivity without opening general network access between consumers and providers. Together, these services support layered segmentation, but their effectiveness depends on consistent routes, narrowly scoped permissions, and testing of both allowed and blocked communication.

Amazon VPCAmazon VPC

Provides virtual networks, subnets, route tables, gateways, security groups, and network ACLs used to define and enforce network boundaries. Separate subnets still require appropriate filtering because local routing normally permits paths between VPC address ranges.

AWS Network FirewallAWS Network Firewall

Provides managed network inspection and filtering for traffic routed through firewall endpoints. It can protect north/south or east/west paths, but route design must prevent bypass and maintain appropriate forward and return paths.

AWS Transit GatewayAWS Transit Gateway

Connects VPCs and on-premises networks through a transit hub. Separate transit gateway route tables and controlled route propagation can restrict connectivity between groups of attachments and support centralized inspection architectures.

AWS PrivateLinkAWS PrivateLink

Provides private access to supported services without requiring broad network connectivity between consumers and providers. Interface endpoints can support service access from isolated subnets, subject to endpoint security groups, applicable endpoint policies, and service authorization.

Network Segmentation exam questions

Real practice exam questions on Network Segmentation, with the correct answer and its explanation. Answer them with every option in the exam simulator.

CLF-C02

A company runs workers that process files uploaded by external users and internal finance servers in separate private subnets of the same Amazon VPC. Current network controls allow all traffic between the subnets. The workers have no business need to connect to the finance servers. The company wants to prevent a compromised worker from initiating connections to those servers. Which change meets this requirement?

Show answerCORRECT ANSWER

Replace the finance servers' permissive inbound security group rules with rules that allow only required connections from approved sources, excluding the workers.

Restricting the finance servers' inbound rules enforces the boundary between the workloads. Excluding the workers from allowed sources prevents worker-initiated connections while preserving required access from approved sources.

MLA-C02 (beta)

A company is deploying an Amazon SageMaker AI real-time inference endpoint. During inference, the custom model container must query a PostgreSQL feature database on TCP port 5432 in the company's VPC. Development instances also run in this VPC. Security requirements state that the model container must not initiate application connections to other VPC resources or the internet, and development instances must not be able to connect to the database. Model artifact access and IAM permissions are already configured. Which network configuration meets these requirements?

Show answerCORRECT ANSWER

Configure the model's VpcConfig with subnets that have no internet gateway or NAT gateway routes. Attach only a dedicated model security group, replace its default outbound rule with TCP 5432 access to the database security group, and configure the database security group to allow inbound TCP 5432 only from the model security group. Leave SageMaker network isolation disabled.

VpcConfig provides the model container with connectivity to the selected VPC. The dedicated security groups permit the required database connection while excluding development instances and other application destinations. Removing internet routes prevents internet access. SageMaker network isolation must remain disabled because enabling it would prevent the container from connecting to the database.

SAP-C03

A company runs frontend servers, processing workers, and PostgreSQL databases on Amazon EC2 instances in one VPC. Each Availability Zone has a private subnet that contains instances from all three tiers. Auto Scaling frequently replaces frontend servers and workers. The VPC has working routes to a NAT gateway and other corporate networks.

Every application instance has two security groups: a tier-specific security group and a shared baseline security group. The baseline group allows all inbound TCP traffic from itself, allows inbound TCP port 9100 from a dedicated monitoring security group, and allows all outbound traffic. Monitoring instances use only the monitoring security group.

A security review establishes these requirements:
• Frontend servers may initiate TCP connections only to workers on port 8443.
• Workers may initiate TCP connections only to databases on port 5432.
• Databases must not initiate TCP connections.
• Monitoring instances must retain the ability to initiate TCP connections to all application instances on port 9100.
• Response traffic for permitted connections must work. All other TCP connections initiated by application instances must be blocked, including connections to the internet and corporate networks.

The solution must accommodate instance replacement without maintaining IP address lists. Subnet placement and routing must remain unchanged.

Which security group configuration meets these requirements?

Show answerCORRECT ANSWER

Remove the baseline group's self-referencing inbound rule and all its outbound rules, but retain its monitoring inbound rule. Configure frontend egress to reference the worker group on TCP 8443, and worker ingress to reference the frontend group on TCP 8443. Configure worker egress to reference the database group on TCP 5432, and database ingress to reference the worker group on TCP 5432. Remove all other application-tier TCP rules and leave the database group without outbound rules. Allow monitoring-group egress on TCP 9100 to the baseline group.

The remaining rules permit only the required connection initiators and destinations. Security group references follow group membership as instances are replaced. Removing the baseline group's broad rules is essential because permissions from attached security groups are combined. Security groups are stateful, so responses to allowed connections do not require reverse-direction rules, including database responses and responses to monitoring requests.

Practice Network Segmentation in a full exam

Questions on Network Segmentation in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Network Segmentation

2 min read

Network segmentation creates boundaries between groups of systems so that connectivity follows security requirements instead of being universally available. Typical boundaries separate production from development, internet-facing components from internal services, and application servers from sensitive databases. The objective is to reduce the paths an attacker can use and limit the blast radius of a compromised workload. Start by identifying required communication: which source must reach which destination, on what protocol and port, and for what operational purpose.

Cloud networks implement these boundaries using virtual networks, subnets, routing, and traffic filtering. In AWS, an Amazon VPC provides a logically isolated network, and each subnet occupies one Availability Zone. Route tables determine where subnet traffic is directed. An internet gateway supports direct internet connectivity, while a NAT gateway can provide outbound IPv4 internet access for workloads without exposing them to unsolicited inbound connections through that gateway. NAT is not a substitute for traffic filtering or application-aware egress inspection.

A public subnet has a route to an internet gateway. That designation does not automatically expose every resource: direct IPv4 internet communication also requires suitable public addressing and permissive security controls. A private subnet lacks a direct route to an internet gateway but may have outbound access through NAT. An isolated subnet has no route for internet access, including through NAT, although it can retain explicitly permitted private connectivity. Private service endpoints can provide access to supported cloud services without requiring an internet route.

Subnets alone do not enforce application isolation. Within an AWS VPC, route tables normally include local routing between its address ranges. Security groups provide stateful filtering on associated network interfaces, while network ACLs provide stateless subnet-level filtering. Security groups contain allow rules; network ACLs support allow and deny rules and require explicit consideration of return traffic. Network ACLs do not filter traffic between resources in the same subnet, so workload-level controls remain important.

North/south traffic crosses a defined environment boundary, such as traffic between the internet and an application. East/west traffic moves between workloads or internal segments. Protecting an internet entry point does not prevent lateral movement between application servers and databases. For a three-tier application, permit HTTPS to the public load balancer, permit application traffic only from the load balancer to the application tier, and permit database connections only from the application tier. Where supported, security group references can express these relationships without relying on changing instance IP addresses.

Stronger boundaries may use separate virtual networks or accounts, with explicitly controlled connectivity through a transit network or inspection firewall. Central inspection only works when routing actually sends the relevant traffic through the firewall; stateful inspection also requires consistent forward and return paths. Additional boundaries increase route management, policy maintenance, troubleshooting effort, and potentially cost and latency. Validate both permitted and prohibited paths using connectivity analysis, flow logs, and controlled tests. When troubleshooting, inspect routes, security groups, network ACLs, firewall policy, addressing, and return paths rather than assuming that a private subnet is inherently isolated.

Learn Network Segmentation in lessons

10 short lessons on Network Segmentation in 7 certification courses.

and 4 more lessons

Open the lessons