gitwtfhub

wtf is xdp-firewall?

gamemann/xdp-firewall — explained in plain English

Analysis updated 2026-07-31 · repo last pushed 2026-05-10

870CAudience · ops devopsComplexity · 4/5MaintainedLicenseSetup · hard

TL;DR

A high-speed Linux firewall that blocks malicious network traffic and DDoS attacks at the network card level, before the operating system fully processes incoming packets.

Mindmap

mindmap
  root((repo))
    What it does
      Blocks malicious traffic
      Defends against DDoS
      Drops bad packets fast
      IPv4 and IPv6 support
    How it works
      Uses Linux XDP technology
      Stateless packet filtering
      Config rules in text file
      Tracks traffic volume
    Use cases
      Protect game servers
      Block attacker IP addresses
      Rate limit traffic per IP
      Ban flooding sources
    Tech stack
      C language
      Linux XDP
      IPv4 IPv6
    Audience
      Network engineers
      Security professionals
      Linux server operators

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Block a known attacker's IP address from reaching your game server

REASON 2

Set packets-per-second limits per IP and auto-ban sources that flood your server

REASON 3

Filter traffic on specific ports to protect services from unwanted access

REASON 4

Drop DDoS attack traffic at the network card before it reaches the OS

What's in the stack?

CLinux XDPeBPFIPv4IPv6

How it stacks up

gamemann/xdp-firewalljwasham/practice-cpeng-zhihui/one-robot
Stars870920760
LanguageCCC
Last pushed2026-05-102020-02-15
MaintenanceMaintainedDormant
Setup difficultyhardeasyhard
Complexity4/51/54/5
Audienceops devopsdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Requires a Linux server with a supported network card and kernel version that supports XDP, plus compiling C code and configuring network interfaces.

Use, modify, and distribute freely, including commercially, as long as you include the original copyright notice.

Wtf does this do

XDP Firewall is a tool that blocks malicious network traffic before it can reach your server, with a particular focus on defending against DDoS attacks. It intercepts internet traffic at the very earliest point possible inside the Linux operating system, which means it can drop bad packets with almost zero delay. It supports both IPv4 and IPv6 networks. Under the hood, it uses a Linux technology called XDP, which lets the system inspect and discard network packets immediately as they arrive at the network card, before the operating system even fully processes them. You configure rules in a text file to tell it what traffic to allow or block, such as specific IP addresses, entire IP ranges, or specific ports. It also tracks traffic volume, so you can set limits on how many packets per second a single IP is allowed to send, and temporarily ban sources that flood your server. The people who would use this are network engineers, security professionals, or anyone running a Linux server that needs to withstand high-volume traffic attacks. For example, a game server operator could use it to block a known attacker's IP address, or to drop any traffic hitting a specific game port that exceeds a safe number of packets per second. It can be managed dynamically, so you can add or remove blocked IPs while the firewall is running without having to restart the service. One notable tradeoff the project makes is keeping the firewall "stateless." Unlike a traditional firewall that tracks the ongoing state of your network connections, this one evaluates each packet on its own merits. This design choice maximizes speed and efficiency, which is critical when absorbing a massive attack, but it means the tool is optimized for blocking and filtering rather than complex traffic routing.

Yoink these prompts

Prompt 1
Help me write XDP Firewall rules to block a specific IP address 192.168.1.100 and an entire IP range 10.0.0.0/24 from reaching my Linux server
Prompt 2
I need to configure XDP Firewall rate limiting to ban any IP sending more than 500 packets per second to my game server on port 27015. Write the config file for me.
Prompt 3
How do I dynamically add and remove blocked IPs in XDP Firewall while the service is running, without restarting it?
Prompt 4
My XDP Firewall is stateless - help me understand which rules I need to explicitly allow return traffic for my web server on ports 80 and 443.
Prompt 5
Walk me through compiling and loading the XDP Firewall on an Ubuntu server with two network interfaces, and help me pick the right interface for filtering.

Frequently asked questions

wtf is xdp-firewall?

A high-speed Linux firewall that blocks malicious network traffic and DDoS attacks at the network card level, before the operating system fully processes incoming packets.

What language is xdp-firewall written in?

Mainly C. The stack also includes C, Linux XDP, eBPF.

Is xdp-firewall actively maintained?

Maintained — commit in last 6 months (last push 2026-05-10).

What license does xdp-firewall use?

Use, modify, and distribute freely, including commercially, as long as you include the original copyright notice.

How hard is xdp-firewall to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is xdp-firewall for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.