Ebpf with Rust: The Journey of a Package
summary
Shows building an eBPF program written in Rust that rewrites UDP destination ports via an XDP prerouting hook, deployed inside two manual Linux namespaces (no Docker). Demonstrates on a Fedora VM that traffic originally to port 15000 is rewritten to 14999 at kernel level—bypassing an active firewall—and presents the exact byte-level port rewrite, with code shown and netfilter/NFtables used only for comparison.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:11EBPF with Rust context
- 5:08Netfilter prerouting
- 9:03Demo environment setup
- 13:16What is EBPF key features
- 16:51EBPF networking XDP
- 21:10EBPF filters virtual networks
- 24:06Live demo redirect EBPF Rust
- 26:40Why Rust for EBPF code
- 29:33Binary protocol parsing
- 31:39Low-level skills importance
- 32:48Conclusion
related talks
46mTracing the Linux kernel with eBPF and Rust
32mDemystifying eBPF - eBPF Firewall from scratch
47mInto the Heart of the eBPF Hive!
30mRun Fast! Catch Performance Regressions in eBPF with Rust
36mRust in the Kernel (via eBPF)
32meBPF: The Next Power Tool of SREs
47mBuilding a lightning fast Firewall with Java & eBPF
33meBPF: exploring use case of BPF kernel infrastructure
