Skip to content
Tech Interview Prep
Technical interview guide

Cloud-Native Network Security

Security groups, network ACLs, and private networking that control traffic flow within a cloud environment.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: AWS VPC, Azure networking/Private Link, Google Cloud NGFW, and NIST SP 800-207 guidance current 2026-08-31.

Overview

Curated: · Written: · Reviewed:

Cloud-Native Network Security

In one line

Cloud-native network security decides which workloads can reach which, using security groups, network ACLs, private networking and identity-aware access. Reach for it whenever a failing connection or an exposure turns on whether a packet should arrive, and say up front that network placement authenticates nobody.

Key definitions

  • Security group (SG): stateful allow-list attached to an ENI or workload. Return traffic for an allowed flow is permitted automatically.
  • Network ACL (NACL): stateless rules at the subnet boundary, numbered and evaluated in order, allow and deny. Each direction is checked separately.
  • Ephemeral port range: the client-side source ports used for return traffic. AWS documents 1024-65535 for clients; a Linux host's own default is narrower.
  • NetworkPolicy: Kubernetes L3/L4 pod policy. It only enforces if the CNI enforces it.
  • Private endpoint: a private address for a managed service. It removes public exposure and authorizes nobody.
  • Metadata hop limit: set to 1 so containerized workloads cannot reach instance metadata.

How it works

  • A packet meets the route table, then the NACL at the subnet edge, then the SG on the ENI, then the host listener.
  • An SG tracks connection state. Allow inbound 443 and the reply is permitted without a rule.
  • A NACL tracks nothing. The inbound SYN is checked against inbound rules. The SYN-ACK leaves the subnet and is checked against outbound rules, so the ephemeral range must be allowed outbound.
  • Pod traffic is overlay traffic that often never crosses a subnet boundary, so SGs and NACLs cannot see it. NetworkPolicy enforced by the CNI does that job.
Client Route table NACL at subnet edge, stateless Security group on ENI, stateful Host listener on 443 Outbound NACL check on SYN-ACK

When to use and when not to

You need toUseWhy
Allow one workload to reach another on a portSecurity groupStateful, per ENI, no return-path rules
Deny a source CIDR across a whole subnetNACLSGs can only allow
Control pod-to-pod trafficNetworkPolicy on an enforcing CNISGs and NACLs do not see overlay traffic
Allow egress by hostnameCNI FQDN policy or managed firewallStandard NetworkPolicy is L3/L4 only
Authorize by HTTP method or pathService mesh L7 policyL3/L4 rules cannot read the request
Remove public exposure of a managed servicePrivate endpoint with public access disabledKeeps traffic on provider backbone, authorizes nobody

A service mesh is overkill for a small system with one trust domain. NetworkPolicy plus identity at the edge is usually enough there.

Traps interviewers probe

  1. Calling NACLs stateful because they "remember" rules. Rule numbers set evaluation order and track no connections. Fix: allow inbound 443 and add an outbound rule for the client ephemeral range. A missing outbound rule drops the SYN-ACK, and the client sees a timeout with the SYN reaching the server.
  2. Expecting an SG to deny. SGs are allow-only. Fix: use a NACL deny rule for a subnet-wide block, or a managed firewall for centralized policy.
  3. Treating a private endpoint as secure by itself. Fix: confirm DNS resolves to the private address from every consumer network, disable public access, and add an endpoint policy or an IAM condition such as aws:SourceVpce.
  4. Trusting X-Forwarded-For. Anyone who can reach the backend directly can set it. Fix: restrict the backend so it accepts traffic only from the proxy, and only then trust the header.
  5. Leaving egress open with metadata reachable. Fix: require IMDSv2 with hop limit 1, deny the link-local range in NetworkPolicy, and restrict egress by destination or FQDN. A default-deny egress policy must still allow DNS to CoreDNS, or everything breaks silently.

Interview tips

Opening: Name the layers before the control: route, NACL, SG, host, then identity. Say network controls decide reachability and identity controls decide authorization.

Expected follow-ups:

  • Why does this connection fail? Trace it layer by layer; do not guess at the SG.
  • How do you secure pod-to-pod traffic? Default-deny NetworkPolicy, selectors, the DNS egress rule, and confirm the CNI enforces it.
  • Is a private endpoint enough? No. It removes exposure; endpoint policy and IAM do the authorizing.
  • How do you keep IPv4 and IPv6 controls equal? Audit both rule sets and test both paths.
  • How do you prove a rule is safe to delete? Flow-log silence is not proof. Pair it with owner confirmation and a reversible disable window.
  • An instance was exposed for six hours. What now? Preserve flow logs and rules, reconstruct who could reach it, rotate credentials, and validate closure from every path.

30-second outline:

  1. Name the path and the layer that decides reachability.
  2. State that an SG is a stateful allow-list and a NACL is stateless, ordered and checked in both directions.
  3. Give the control for this requirement: NetworkPolicy, private endpoint, or egress firewall.
  4. State what it does not decide: authorization still needs identity.
  5. Name the proof: positive and negative probes, plus flow logs.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.