Features: - High-performance packet filtering via eBPF/XDP - Instant blocklist with dynamic CLI management - Exact-match rules with Drop/Pass/Log actions - CIDR-based IP range dropping via LPM trie - Token-bucket rate limiting (IP-based and flow-based) - Auto temp bans for rate limit violators - Real-time event logging via BPF ring buffer - Interactive TUI monitor with live stats Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
459 B
Bash
Executable File
19 lines
459 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
ip link del veth0 2>/dev/null || true
|
|
ip netns del testns 2>/dev/null || true
|
|
|
|
ip link add veth0 type veth peer name veth1
|
|
ip addr add 10.200.1.1/24 dev veth0
|
|
ip link set veth0 up
|
|
|
|
ip netns add testns
|
|
ip link set veth1 netns testns
|
|
ip netns exec testns ip addr add 10.200.1.2/24 dev veth1
|
|
ip netns exec testns ip link set veth1 up
|
|
ip netns exec testns ip link set lo up
|
|
|
|
echo "veth0 (host) = 10.200.1.1"
|
|
echo "veth1 (testns) = 10.200.1.2"
|