Description
xdp-firewall is a stateless firewall that attaches to the XDP hook in the Linux kernel and uses eBPF to process packets early and quickly. The project is aimed at network engineers, security professionals and programmers who want to learn XDP or build high-performance packet filtering. It can drop traffic from known bad source IP addresses and drop whole CIDR ranges. Dynamic, rule-based filters can match protocols, ports and addresses, and support temporary bans. Real-time packet counters are included, and IPv6 is supported. Blocked addresses are kept in BPF maps for fast lookups, and CLI tools such as xdpfw-add and xdpfw-del manage them. Features can be turned on or off at build time in config.h, or at runtime in a config file, and the README advises disabling unused features for best performance. The README presents it as a learning resource for DDoS mitigation and packet flow.…
Highlights
- Stateless XDP and eBPF filtering early in the network stack
- Source IP blocking and CIDR range dropping with BPF maps
- Rule-based filters with temporary bans
- Real-time packet counters and IPv6 support
- Managed with the xdpfw-add and xdpfw-del CLI tools
Ratings & Reviews
No ratings yet
Be the first to rate XDP Firewall.
People also visit
XDP Firewall FAQ
What is xdp-firewall?
A stateless firewall for Linux that uses the kernel's XDP hook and eBPF to drop or allow packets quickly.
What is it useful for?
Dropping traffic from bad source IPs or ranges, such as during a DDoS attack, and filtering by protocol, port and address.
How do I manage blocked addresses?
With the xdpfw-add and xdpfw-del command line tools, which change the BPF map used for blocking.
Does it support IPv6?
Yes. The project says IPv6 is supported.
How do I reduce overhead?
Disable the features you do not use, either in config.h before compiling or in the runtime config file, because the README says this gives the best performance.
What are the best XDP Firewall alternatives?
Popular alternatives to XDP Firewall include IPFire, Whalewall and Oryx. See all XDP Firewall alternatives

