Skip to content
Tech Interview Prep
Technical interview guide

Network Security Basics

Firewalls, VPNs, and network segmentation: the perimeter and internal controls that limit blast radius.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: NIST SP 800-41 Rev. 1, SP 800-77 Rev. 1, SP 800-207/207A, CISA ZTMM 2.0, and RFC 8446 guidance accessed 2026-08-31..

Overview

Curated: · Written: · Reviewed:

Network Security Basics

In one line

A firewall decides which flows may cross a boundary, and segmentation, VPN scoping and identity-aware access decide what a compromised host can reach next. Reach for these when you design or review how zones, remote access and egress are allowed to talk.

Key definitions

  • Stateful firewall: tracks each connection in a state table and admits return traffic that matches an established entry.
  • Stateless filter: evaluates each packet alone, first match wins, with no memory of earlier packets.
  • Default deny: anything without a named rule is dropped. Each rule names source identity or scoped network, destination, port, purpose, owner and expiry.
  • Segmentation: limits reachability between zones so one compromise has a bounded blast radius.
  • Split tunnel: only listed routes go through the VPN; everything else leaves the device directly.
  • Policy decision point and enforcement point: the engine decides, and the gateway or host applies the scoped session.

Formulas and complexity

Connection-table arithmetic from the figures in the table-full scenario (assumes all 120,000 long-lived flows hold entries and each new flow takes one):

entries needed=120,000+15,000=135,000>131,072⇒refused=3,928\text{entries needed} = 120{,}000 + 15{,}000 = 135{,}000 > 131{,}072 \Rightarrow \text{refused} = 3{,}928

The counter that increments is table-full, by 3,928. CPU at 17% and link at 5% show that the limit is state, not throughput. Idle timeouts (7,200 s established, 45 s half-open) decide how long dead entries occupy the table.

How it works

  • Packets are matched against the rule set top-down. A stateful device checks the first packet of a flow against the rules, creates a state entry, and admits matching return traffic.
  • A stateless device checks every packet against the rules alone, so a misordered rule is final.
  • Each service flow needs its own rule, including DNS and NTP. A rule for an IP address does not cover a hostname lookup.
  • Enforcement happens at several points (cloud security group, host firewall, proxy, mesh). The effective path is the intersection of all of them.
8443 only 5432 only no rule, dropped Client Perimeter firewall Web tier App tier Database Compromised web host

When to use and when not to

ControlUse whenDoes not give you
Stateful firewallBoundary with return traffic and connection-level policyInspection of malicious data inside allowed sessions
Stateless filterCoarse, very high-rate filteringConnection context or reply tracking
SegmentationZones with genuinely different blast radiusContainment if every zone can still reach every other
Full tunnelCentral policy and logging for all remote trafficLatency and capacity headroom
Split tunnelCapacity and latency for large fleetsInspection of traffic that goes direct
Site-to-site IPsecTwo sites with known peersDevice health or user authorization

Traps interviewers probe

  • Allowing a destination IP and assuming the name works. Fix: permit DNS to the approved resolver and allow the 443 destination that the resolver returns, then test by name and by IP.
  • Pushing a whole private network through the VPN. Fix: push only the routes users need and authorize per application.
  • Treating a managed device or a source address as identity. Fix: require verified user or workload identity, current posture and an authorization decision for the specific action.
  • Scoping a deny to one subnet or one IP family. Fix: enumerate every address the service holds, IPv4 and IPv6, and test from outside.
  • Deploying default deny from the architecture diagram. Fix: observe real flows across a full cycle including batch jobs, generate rules, review them, and enforce one segment at a time.

Interview tips

Open with the boundary and the blast radius: "I would default-deny at each zone edge, scope every flow by identity and port, and verify with counters from both sides."

Follow-ups to expect: stateful versus stateless behavior; full versus split tunnel; what happens when the policy service is down (fail closed for writes, validate reads locally from the token); IPv6 parity; and drift after an emergency edit, which GitOps self-heal reverts within its reconciliation interval.

30-second outline: (1) name the zone and what it protects. (2) Default deny plus named, scoped flows. (3) Identity over IP address. (4) Enforcement points and the counters or logs that prove the path. (5) Failure behavior and the rule lifecycle with owners and expiry.

Feedback on this overview

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