← Interview Prep

DC IPv6 with Host-Based Firewalling

A data-center security model where policy is enforced on every host — distributed stateful firewalling and microsegmentation instead of hair-pinning east-west traffic through a central perimeter box.

This is the companion to the plain IPv6 DC fabric page. There we build a routed leaf-spine substrate; here we answer the question that substrate forces: in a large, flat, end-to-end-routable IPv6 fabric, where does the firewall live? The modern answer is on the hostHost-Based Firewalling (HBF).

A big IPv6 DC has no meaningful "inside vs outside" for east-west traffic — every server can route to every other server. A single perimeter firewall can neither see nor scale to that server-to-server volume, and forcing traffic through it adds a latency tax and a blast-radius bottleneck. HBF pushes a stateful, identity-based policy down to every host, so the enforcement point sits right next to the workload and scales linearly with the fleet.

The fabric HBF runs on (brief recap)

HBF is a security model layered on top of the routed IPv6 fabric — it does not replace it. The substrate, covered in depth on the DC IPv6 architecture page, is a leaf-spine (Clos) L3 fabric:

The takeaway for security: every host is directly routable from every other host. That is exactly why the enforcement problem moves onto the host.

Why host-based firewalling

The classic design puts a big stateful firewall pair at the DC edge and treats "inside" as trusted. That model breaks in a modern DC for three reasons:

ProblemWhy the perimeter firewall fails
VisibilityMost DC traffic is east-west (service-to-service, replication, RPC). It never crosses the edge, so a north-south perimeter box simply never sees it.
ScaleEast-west volume is often 5–10× north-south. A central appliance can't grow to Tbps of intra-fabric traffic; the fabric can.
Latency / hair-pinningTo inspect east-west you must hair-pin flows to the firewall and back — extra RTTs, a bandwidth tax, and a single chokepoint that also becomes the blast radius when it fails.

HBF inverts this: instead of steering traffic to the policy, the policy travels to the traffic. Enforcement happens at the source and/or destination host, on the path the packet was already taking. Capacity scales with the number of hosts, and there is no central box to hair-pin through or overwhelm.

What HBF is

A stateful firewall enforced on each host — in the kernel, the hypervisor, or the NIC — rather than in a network appliance. The enforcement point is co-located with the workload, so the rules move with the workload (across reschedules, migrations, autoscaling).

Enforcement pointMechanismNotes
Linux kernelnftables / iptablesClassic stateful firewall via conntrack; per-host rulesets programmed by an agent.
eBPF / XDPPrograms at the socket, TC, or driver hookCilium-style: policy as bytecode, map-based lookups, enforcement before the packet hits the stack. Fast and scalable.
Hypervisor vSwitchOVS + security groupsEnforced on the host for every VM; the guest can't bypass it.
Cloud security groupsProvider-enforced on the host/NICAWS SG / Azure NSG / GCP firewall — HBF you don't run yourself, applied at the vNIC.
Service meshSidecar / ambient proxy (mTLS)L7 identity-based policy with cryptographic workload identity (SPIFFE), complementary to L3/L4 HBF.
SmartNIC / DPUOffloaded datapathEnforcement runs on the NIC's own cores — frees host CPU and cuts latency (see offload below).

Microsegmentation & zero-trust east-west

The point of putting a firewall on every host is not to draw the same coarse zones in more places — it is to make the segments small. The stated goal is the segment of one: every workload is its own zone and nothing may reach it unless a policy explicitly allows it.

Policy model & distribution

HBF is only as good as the system that keeps millions of per-host rules correct and current. That is a control-plane problem: authors write high-level intent; a central engine compiles it into the concrete rules each host must enforce.

  Intent (identity/label policy)
        │   "web may talk to db:5432; deny all else"
        ▼
  ┌───────────────────────┐
  │   Policy controller   │   compiles intent → per-host rulesets
  │  (label → address DB) │   resolves labels to current addresses
  └───────────┬───────────┘
              │  push / pull (incremental deltas)
      ┌───────┼───────┬───────────────┐
      ▼       ▼       ▼               ▼
  ┌───────┐┌───────┐┌───────┐     ┌───────┐
  │ agent ││ agent ││ agent │ ... │ agent │   (one per host)
  │nft/eBPF││nft/eBPF││nft/eBPF│    │nft/eBPF│
  └───────┘└───────┘└───────┘     └───────┘
  each host: local ruleset + conntrack state

IPv6 specifics that matter for HBF

IPv6 is not just "IPv4 with longer addresses" for a firewall — several of its properties directly shape HBF design.

IPv6 propertyConsequence for HBF
Huge /64 space264 addresses per subnet — you cannot enumerate or scan by IP. Policy must be identity/label-based; address-list ACLs are a non-starter.
SLAAC + temporary addresses (RFC 8981)A host cycles through many ephemeral privacy addresses. Policy must key off stable identity, never a specific address; egress rules must tolerate the source address changing under them.
Multiple addresses per interfaceLink-local + one or more globals + temporaries all coexist. Rules must account for the full set the workload may source from, and for link-local NDP.
ND / NS / NANeighbor Discovery replaces ARP and runs over ICMPv6. The host firewall must permit NS/NA (and RS/RA where used) or the host loses L2 reachability entirely.
ND cache exhaustionA sparsely populated /64 lets an attacker trigger ND for countless non-existent hosts, bloating the neighbor cache. Per-host ND cache limits / rate-limits are part of the hardening.

Do NOT blanket-block ICMPv6

ICMPv6 is load-bearing in IPv6 — unlike ICMP in IPv4, you cannot just drop it. Two categories the host firewall must always allow:

Also generally permit echo (types 128/129) and the essential error types (Destination Unreachable, Time Exceeded, Parameter Problem) rather than a wildcard drop.

Offload & performance (the low-latency angle)

Enforcing a stateful firewall on the host is not free: every packet costs CPU cycles for classification and conntrack lookups, and each hook adds latency and jitter. In a low-latency / trading context that tax is the whole ballgame, so where enforcement runs matters.

Tradeoffs: HBF vs centralized perimeter firewall

DimensionHost-based (HBF)Centralized / perimeter
East-west visibilityFull — enforced at every host on the real pathNone unless you hair-pin traffic to it
ScaleLinear with the fleet — capacity added with hostsBounded by the appliance pair; a hard ceiling
Latency / hair-pinningOn-path, no detour; can be offloaded to the NICExtra RTT and bandwidth tax to steer through the box
Blast radiusSmall — one host's failure is isolatedLarge — the central box is a single chokepoint
Per-host CPU costReal — cycles/jitter on every host (mitigate via eBPF/DPU)None on the host; cost is centralized
Policy consistencyEventually consistent across millions of agents — harderOne place to configure; trivially consistent
Operational complexityDistributed control plane, agents, fleet-wide rolloutFewer, well-understood chokepoints to manage
Bypass resistanceEnforced below the guest (kernel/hypervisor/NIC)Enforced only where traffic transits it

In practice large DCs run both: a perimeter firewall for coarse north-south and DDoS scrubbing at the edge, and HBF for the fine-grained east-west microsegmentation the perimeter can't see. HBF is "in addition to," not purely "instead of."

Observability & failure modes

Distributing the firewall distributes the debugging. A dropped connection no longer has one place to look — it could be enforced at the source host, the destination host, or dropped by a stale policy on either.

Follow-up questions

Related: DC IPv6 Architecture · Low-Latency & Trading Networks · Linux Basics & Troubleshooting.