XDP-Based DDoS Mitigation Firewall by StrenoxDevelopment
Strenox DDoS Migration attaches to a network interface at the earliest possible point in the Linux networking stack and makes drop/pass decisions before the kernel allocates an SKB. Target: 10M+ packets per second on a single core with sub-microsecond per-packet overhead.
- XDP-native: Line-rate packet processing at the driver level
- Multi-vector detection: SYN flood, UDP flood, ICMP flood, amplification, L7 signatures
- Behavioral analysis: EMA-based baseline learning, bot cluster detection
- Auto-escalation: 6-level star system with subnet bans
- Panic circuit breaker: Per-CPU probabilistic bulk drop
- SYNPROXY: Scalar SYN flood mitigation at XDP line rate
- Geo-blocking: MaxMind GeoIP2 database support
- Blocklist auto-fetch: Public blocklist URL fetching
- Real-time TUI: 7-screen dashboard with live charts
- Metrics API: Prometheus-compatible JSON endpoint
- Alerts: Discord and Slack webhooks
- Forensics: Attack bundles with config snapshots
- Linux kernel 5.10+ with BPF/XDP support
- clang/llvm 12+
- bpftool
- Go 1.22+
- libbpf-dev
# Clone the repository
git clone https://github.com/StrenoxDevelopment/strenox-migration.git
cd strenox-migration
# Build everything
make all
# Or use the build script
./scripts/build.shsudo make installEdit /etc/strenox/strenox.toml:
[general]
interface = "eth0"
mode = "active"
log_level = "info"
[detection]
rate_limit_pps = 10000
syn_pps_threshold = 5000# Start the firewall
sudo strenox start
# Check status
sudo strenox status
# View statistics
sudo strenox stats
# Launch TUI dashboard
sudo strenox tui
# Stop
sudo strenox stop| Command | Description |
|---|---|
strenox start |
Start the XDP firewall |
strenox stop |
Stop the firewall |
strenox status |
Show current status |
strenox ban <ip> |
Ban an IP address |
strenox unban <ip> |
Unban an IP address |
strenox whitelist <ip> |
Whitelist an IP |
strenox unwhitelist <ip> |
Remove from whitelist |
strenox stats |
Show statistics |
strenox reload |
Hot-reload config |
strenox tui |
Launch TUI dashboard |
strenox export-signatures |
Export L7 signatures |
strenox import-signatures <file> |
Import L7 signatures |
- Parse Ethernet header
- Parse IP header (IPv4/IPv6)
- Bogon filter (RFC1918, loopback, multicast, reserved)
- Fragment drop
- L4 parse (TCP/UDP/ICMP)
- TCP flag validation
- Whitelist check (Bloom filter + hash)
- Ban check (hash + LPM trie)
- Rate scoring (per-IP PPS/BPS/protocol)
- Connection tracking (blind SYN-ACK/RST)
- Amplification detection (DNS/NTP/SSDP/Memcached)
- L7 signature match (16-slot mask-and-compare)
- Behavior engine (baseline + cluster detection)
- Attack mode check
- Panic circuit breaker
- Pass/Drop decision
| Map | Type | Purpose |
|---|---|---|
config_map |
ARRAY | Runtime configuration |
ip_stats_map |
LRU_HASH | Per-IP statistics |
ban_map |
LRU_HASH | Active bans |
subnet_ban_map |
LPM_TRIE | Subnet bans |
whitelist_map |
HASH | Whitelisted IPs |
global_stats_map |
PERCPU_ARRAY | Global counters |
baseline_map |
ARRAY | Behavior baseline |
events_map |
RINGBUF | Userspace events |
l7_sig_map |
ARRAY | L7 signatures |
bloom_map |
ARRAY | Bloom filter |
panic_bucket_map |
PERCPU_ARRAY | Panic state |
prefix_ban_map |
LRU_HASH | Prefix ban counters |
new_source_map |
ARRAY | New source tracking |
# Unit tests
go test -race ./...
# Integration tests (requires root)
sudo go test -tags=integration ./test/integration/...
# Attack simulation
sudo ./scripts/test-attack.sh 127.0.0.1 80 loMIT License — see LICENSE for details.
Built with ❤️ by StrenoxDevelopment