Optimizing Magic Firewall’s IP lists
Mar 29, 2022Jordan Griege

Summary
This post details the optimization of Magic Firewall's IP lists by migrating from nftables sets to eBPF maps (BPF_MAP_TYPE_LPM_TRIE). This change significantly reduced memory consumption by allowing IP lists to be shared across network namespaces instead of being duplicated. The post also describes the necessary patch to the nftables project to enable direct integration of eBPF programs, allowing for atomic rule replacements and enhanced packet inspection 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