Network Containment
Network containment isolates a breached subnet or host to stop lateral movement across your servers. You enforce it by blocking unauthorized traffic routes with strict firewall rules and subnet boundaries. Most teams start by grouping servers into private zones and restricting open ports between them. Still, broad role permissions and shared admin keys often let users bypass these boundaries during incidents. How network containment works in native cloud setups In a standard cloud setup, team
Containment: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
Network containment isolates a breached subnet or host to stop lateral movement across your servers. You enforce it by blocking unauthorized traffic routes with strict firewall rules and subnet boundaries. Most teams start by grouping servers into private zones and restricting open ports between them. Still, broad role permissions and shared admin keys often let users bypass these boundaries during incidents.
How network containment works in native cloud setups
In a standard cloud setup, teams divide a virtual network into smaller isolated subnets. Public subnets hold load balancers, while private subnets hold backend apps and databases. Security groups and network control lists sit at the edges of these subnets. These native controls read the source IP, destination IP, and port of every packet.
When a host shows signs of compromise, operators update these rules to quarantine the machine. They revoke outbound routes so the infected server cannot talk to neighboring systems. They also block inbound traffic from standard user networks while keeping a tight admin path open. This lets the response team log in, inspect logs, and fix the root cause.
Teams also use virtual private networks and peering links to join separate cloud accounts. To contain a breach here, operators disable the peering link or drop the route table entries. This cuts off the affected zone from the rest of the company systems right away.
What packet filtering solves and where it falls short
Native network controls do a great job of blocking unwanted traffic at the transport layer. They stop attackers from scanning ports or reaching databases from an untrusted web server. If an intruder lands on an isolated host, firewall rules shrink the blast radius fast.
Yet network rules only decide which machines can open a socket to another machine. They do not inspect what an authorized user or app does inside an allowed session. Engineers still need a way to reach production databases and servers to do their daily work. Once a user connects through an allowed path, the firewall sees valid packets and steps aside.
If an attacker steals an engineer's laptop or session token, they ride that same allowed path. The network firewall cannot tell the difference between a safe check and a table drop. It also cannot rewrite sensitive fields like emails, phone numbers, card numbers, or national IDs. True containment requires controls that inspect single commands and queries in flight, not just IP addresses.
Containment: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Steps to tighten session control during an incident
First, map every path that engineers and automated tools use to reach private subnets. Replace broad subnet peering rules with narrow rules that only allow needed ports and protocols. Remove static database passwords and long-lived SSH keys from developer laptops and build servers.
Next, separate everyday read tasks from high-risk write tasks across your systems. Do not give engineers standing admin roles just so they can read logs or check state. When a breach happens, revoke active sessions at the identity level while locking down the subnet. Finally, log every query and command so your team can trace what changed during the incident.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
What is the main goal of network containment?
The main goal is to stop an attacker from moving from one compromised host to others. It traps the threat in a small zone while your team fixes the issue.
How does network segmentation differ from network containment?
Segmentation is the daily practice of splitting a network into smaller zones with strict traffic rules. Containment is the active response step of cutting off a zone when an alert fires.
Why do attacks still spread across segmented networks?
Attacks spread when stolen user keys or broad roles have valid routes across segment borders. Packet filters allow the traffic because it comes from an approved source IP and port.
Short role checks help teams work fast. Simple rules make each review clear. Good logs keep every team safe. Scoped keys stop bad changes early.
Related guides
In this post