How to build your own VPN, or- the history of WARP
Oct 29, 2025Chris Branch

Summary
This post details the initial implementation of WARP, Cloudflare's mobile-first performance and security app, which involved building a high-performance VPN using the Linux networking stack. It explains the technical challenges of securely and efficiently egressing arbitrary user packets from edge machines, detailing the use of Layer 3 VPN tunneling, Network Address Translation (NAT) with Netfilter and nftables, and the role of the conntrack module for stateful packet handling. The post also highlights the use of TUN devices and packet marking for distinguishing WARP client traffic and controlling routing decisions, laying the groundwork for future zero-trust products and capabilities.
More from the Website Security & Threat Management trail
- We tested our own WAF with frontier AI models. Here’s what we found
- When scanners miss the attack: how Cloudflare Client-Side Security protects storefronts
- Introducing automatic remediation policies with Cloudflare CASB
- Introducing context-aware vulnerability discovery and remediation with Cloudflare Managed Defense and OpenAI Daybreak Models
- Introducing Adaptive Intelligence: undermining the economics of every bot attack