Isolation
Keeping workloads apart: containers, users, namespaces, seccomp, gVisor and Firecracker, and what each actually protects against.
29 posts
nftables vs iptables: The Linux Firewall, Then and Now
nftables is the successor to iptables in the Linux kernel: one tool for IPv4, IPv6 and more, sets and maps, atomic rule updates, and a cleaner syntax. How the two relate (including iptables-nft), a complete server ruleset, translating rules, and the Docker, UFW and firewalld interactions that trip people up.
Linux Memory Overcommit: Why malloc Never Fails and the OOM Killer Does
Linux lets processes allocate more memory than exists, betting they won't all use it — that's overcommit. How the three vm.overcommit_memory modes work, CommitLimit and Committed_AS, why fork and copy-on-write depend on it, why Redis wants mode 1 and Postgres prefers mode 2, and how cgroup limits change the picture.
Docker Launches Cloud Sandboxes for AI Agents — and Open Kits on OCI
On 24 September 2026 Docker launched Cloud Sandboxes, extending its local agent sandboxes to Docker-managed cloud infrastructure with the same microVM isolation, policies and CLI, boot times in the low hundreds of milliseconds and 1–16 vCPUs. It also published next-generation Kits, an OCI-based spec for packaging an agent, its tools and its access rules.
CRIU: Checkpoint and Restore Running Linux Processes
CRIU (Checkpoint/Restore In Userspace) freezes a running process tree, saves its complete state to disk, and restores it later — on the same machine or another. How it works, using it with Podman, Docker and Kubernetes, what it can't capture (GPUs, external connections), permissions, and how it compares with VM snapshots for persistent agent workspaces.
What Is eBPF? Safe Programs Inside the Linux Kernel, Explained
eBPF lets you run small, verified programs inside the Linux kernel at hook points — syscalls, network packets, function entry — without kernel modules. How it works (verifier, JIT, maps, hooks), what it powers, bpftrace one-liners, and its limits and security implications.
WebAssembly as a Sandbox: Running Untrusted Code With Wasmtime and WASI
WebAssembly's design makes it a strong in-process sandbox: linear memory, no ambient authority, and capability-based access through WASI. How the isolation works, limiting CPU with fuel and epochs, memory limits, the component model, real uses for plugins and user code, and where it falls short.
vsock Explained: Talking Between a VM and Its Host Without a Network
vsock is a socket family for communication between a virtual machine and its host — no IP addresses, no network interface, no firewall rules. How AF_VSOCK addressing with CIDs and ports works, vhost-vsock in QEMU, Firecracker's Unix-socket bridge, how sandboxes use it for guest agents, and the security model.
V8 Isolates: How Edge Platforms Run Thousands of Tenants in One Process
A V8 isolate is an independent JavaScript heap and execution context inside one process. How isolates make edge runtimes start in milliseconds and pack thousands of tenants together, what isolation they provide, Spectre and the extra layers platforms add, limits, and isolates vs containers vs VMs.
runc and OCI Runtimes: What Actually Starts Your Container
Below Docker and containerd sits a small program that creates the namespaces, cgroups and mounts and execs your process: the OCI runtime. The OCI image, runtime and distribution specs, a bundle and config.json, running runc by hand, alternatives (crun, youki, gVisor's runsc, Kata), and runc's notable escapes.
Linux Namespaces Explained: The Kernel Feature Containers Are Made Of
A container is a process with its own namespaces. What each of the eight Linux namespaces isolates — mount, PID, network, UTS, IPC, user, cgroup, time — how to build a container-like process by hand with unshare, inspect one with nsenter and /proc, and what namespaces do not protect against.
Linux Capabilities: Splitting Root Into Pieces
Linux capabilities break root's power into about 40 separate privileges, so a process can have just the one it needs. The capability sets (permitted, effective, inheritable, bounding, ambient), file capabilities with setcap, Docker's default set and --cap-drop ALL, why CAP_SYS_ADMIN is 'the new root', and inspecting capabilities.
Landlock: Unprivileged Sandboxing Built Into the Linux Kernel
Landlock lets an unprivileged process restrict its own filesystem and network access, permanently, for itself and its children. How rulesets, access rights and ABI versions work, a minimal C/Rust-style walkthrough, how it compares with seccomp, namespaces and AppArmor, and why coding agents use it.
Kata Containers: Container Ergonomics With VM Isolation
Kata Containers runs each pod or container inside a lightweight virtual machine with its own kernel, while keeping the OCI and Kubernetes interfaces. How the runtime, guest agent and virtio-fs fit together, hypervisor choices, the performance costs, what it protects against, and when it's worth it.
io_uring and Security: Why Sandboxes Turn It Off
io_uring made Linux I/O dramatically faster — and became one of the kernel's biggest sources of privilege-escalation bugs. How io_uring works, why it sidesteps seccomp filtering, which platforms disable it, the io_uring_disabled sysctl, restriction APIs, and what to do for containers and code sandboxes.
Firecracker Snapshots: Restoring MicroVMs in Milliseconds
Firecracker can pause a microVM, write its memory and device state to disk, and restore it later — or many times over. How the snapshot API works, full vs diff snapshots, lazy memory loading with userfaultfd, and the hard part: making clones unique (randomness, network identity, clocks) and safe.
The Claude Code Sandbox: Limit What Shell Commands Can Touch
Claude Code's built-in sandbox wraps the shell commands Claude runs in an OS-enforced boundary: writes limited to your project, network only to allowed domains. How to turn it on, auto-allow mode, allowWrite, denyRead, allowedDomains, excludedCommands, credential masking, and what runs outside it.
Running Claude Code in a Dev Container
Put Claude Code inside a dev container so every command it runs happens in an isolated, reproducible environment instead of on your machine. Adding the official Dev Container Feature, persisting login across rebuilds, enforcing policy with managed settings, restricting network egress, and the limits of the protection.
Bubblewrap (bwrap): Building Unprivileged Sandboxes From Namespaces
Bubblewrap is the small, unprivileged sandboxing tool behind Flatpak and several AI coding agent sandboxes. How it assembles a sandbox from user, mount, PID and network namespaces, practical bwrap command lines, adding seccomp, network allow-listing via a proxy, the Ubuntu AppArmor user-namespace restriction, and its limits.
How KVM Virtualization Works: The Isolation Behind Cloud Servers
Most cloud VMs run on KVM. How hardware-assisted virtualization works — VT-x/AMD-V, the VMM, virtio, two-level page tables — what a VM boundary protects against compared with containers, the remaining risks (side channels, noisy neighbours, steal time), and what shared vs dedicated vCPUs mean.
How to Run AI-Generated Code Safely
AI-generated code is usually well-intentioned and occasionally destructive, and the packages it installs are a supply-chain risk of their own. A practical, layered approach — what the code can see, reach, consume, and outlive — with a hardened Docker command you can use today.
Rootless Containers and User Namespaces: What They Actually Protect
Root in a container is root on the host unless something remaps it. How user namespaces work, subuid/subgid ranges, Docker userns-remap vs rootless mode vs Podman, Kubernetes hostUsers: false, the file-ownership and networking costs, and where rootless fits.
Prompt Injection in Coding Agents: A Threat Model
A coding agent with a shell, credentials, and network access reads text written by strangers all day. A threat model — sources, capabilities, sinks — why detection-based defences fail, and the architectural controls that actually bound the damage.
Firecracker vs gVisor vs Containers: Choosing Isolation for Untrusted Code
Containers share a kernel; gVisor intercepts it; Firecracker gives each workload its own. How the three isolation models actually work, what each costs in performance and compatibility, and how to match the boundary to the threat — for AI agents, multi-tenant platforms, and code execution.
Containers vs Virtual Machines: The Difference, Simply Explained
Both let one physical computer act like many. A virtual machine pretends to be a whole computer; a container is an isolated group of processes sharing one operating system. How each works, the trade-offs in speed, size, and isolation, and when to use which.
Container Networking Internals: veth, Bridges, NAT, and Embedded DNS
What happens when a container sends a packet: network namespaces, veth pairs, bridges, NAT for egress and published ports, why published ports bypass firewalls like ufw, Docker's embedded DNS, inter-container isolation, and debugging with nsenter and tcpdump.
Hardening Containers With Capabilities, seccomp, AppArmor, and User Namespaces
A default container shares the host kernel and starts with more privilege than most workloads need. A layer-by-layer guide: dropping capabilities, no-new-privileges, seccomp, AppArmor and SELinux, read-only filesystems, and user namespaces — and how to verify each.
How Container CPU and Memory Limits Actually Work
docker run --cpus 2 --memory 4g looks simple. Underneath, it's cgroup v2 files with behaviour that surprises people: CPU limits that throttle rather than slow, memory limits that count page cache, and tools inside the container that report the host's resources. How to read the real numbers.
Claude Code --dangerously-skip-permissions: When It's Safe, and What to Use Instead
An agent that stops to ask permission can't work while you're away. An agent that never asks can delete things. How Claude Code's permission modes and allow/deny rules work, when skipping prompts is reasonable, and what has to be true of the environment first.
Docker vs Linux Users for Multi-Tenant Workspace Isolation
Separate Linux users look like a cheap way to isolate tenants until you try to enforce a CPU limit. A walkthrough of why containers win for multi-tenant development workspaces — and how to verify the limits are real.