Aegis
A high-performance, distributed Zero Trust firewall using eBPF/XDP. Aegis enforces identity-based micro-segmentation, dynamically opening network paths only after user authentication. Features a Go Control Plane and Rust Data Plane for kernel-bypass speed and granular access control.
Install / Use
/learn @pushkar-gr/AegisREADME
Aegis
High-Performance Zero Trust Network Controller
Aegis is a distributed, kernel bypass firewall designed to enforce Identity-Based Micro-Segmentation using eBPF technology. It is lightweight, efficient, and can be directly deployed in a router or edge gateway. Unlike traditional firewalls that rely on static IP rules, Aegis operates on a "Default Drop" posture, dynamically opening ephemeral network paths only after a user has authenticated via a secure Control Plane.
Designed for Network Security, Aegis bridges the gap between Identity Providers (IdP) and raw network enforcement. It transforms your network gateway into an identity aware enforcement point.
Where to use it
- Critical Infrastructure: Micro-segment sensitive assets like Databases, SSH Jump Hosts, and Internal Dashboards.
- Zero Trust Migration: Replace static firewall rules (IP-whitelisting) with dynamic, ephemeral access based on user identity.
How it works
- Deploy: Run the Controller centrally and the Agent on your network gateway (router/server).
- Configure: Define protected Services (IP:Port) and User Roles via the Admin UI.
- Connect: Users authenticate via the Web Portal and click to "activate" a service.
- Enforce: The Agent instantly updates kernel-level eBPF maps to allow traffic only from that user to that service for till the user is active.
Architecture
There are two components, Control Plane (User Authentication and Policy) and a Data Plane (Packet Enforcement).
- Authentication: Clients access the Controller (in the Private Zone) to authenticate via a web interface.
- Policy Dispatch: After a valid login, the Controller pushes a signed "session" to the Agent via gRPC.
- Enforcement: The Agent (Gateway) updates its eBPF maps in the kernel, instantly allowing traffic from that specific user IP to the requested service.
- Auto-Revocation: If the user becomes inactive, the Agent automatically purges the rule, closing the firewall hole.
Key Features
- Kernel Bypass Speed: Uses eBPF/XDP (C) to filter packets at the network driver level, occurring before the OS handles memory allocation.
- Distributed Design: Decouples the Control Plane (Go/gRPC) from the Edge Data Plane (Rust/libbpf-rs) for scalability.
- Granular Access Control: Enforces strict
User IP -> Service IP:Portpathways. No broad network access is granted. - Automated Lifecycle: The Edge Agent automatically revokes rules after 60 seconds of inactivity, preventing stale permissions.
Tech Stack
- Control Plane: Go (Golang 1.25), gRPC, SQLite.
- Edge Agent: Rust, libbpf-rs, Tokio, Tonic.
- Kernel Hook: C (eBPF XDP).
NOTE: frontend for this project was completly written by gemini.
Documentation & Setup
Aegis is split into two components. Refer to their respective directories for detailed build and configuration instructions.
Default login: username
root, passwordroot.
| Component | Description | Docs | | :--- | :--- | :--- | | Controller | The central authority handling authentication (SSO), policy management, and distributing rules to agents. | Controller Docs | | Agent | The edge node daemon running on routers/servers. It attaches eBPF programs to network interfaces and enforces rules. | Agent Docs |
Quick Start (Docker Compose)
For a local setup with Controller, Agent, and simulated Client/Service zones:
docker-compose -f deploy/docker-compose.yml up --build -d
Performance & Benchmarks
Aegis is optimized for extreme low latency environments and minimal footprint. Read detailed benchmarks results in Benchmarking Docs
Reproduce Benchmarks:
To run all comprehensive benchmarks (requires root for XDP hook):
cd agent
sudo -E cargo test -- --ignored --nocapture
or
sudo ./run_benchmarks.sh
Available Benchmarks:
-
Attack Scenario - Tests packet processing when all traffic is malicious (dropped)
sudo -E cargo test benchmark_attack_scenario_dropped_packets -- --ignored --nocapture -
Legitimate Traffic - Tests packet processing when all traffic is authorized (accepted)
sudo -E cargo test benchmark_legitimate_traffic_accepted_packets -- --ignored --nocapture -
Mixed Traffic - Tests realistic scenario with 50% legitimate and 50% attack traffic
sudo -E cargo test benchmark_mixed_traffic -- --ignored --nocapture -
Map Operations - Benchmarks eBPF map insert/lookup/delete performance
sudo -E cargo test benchmark_map_operations -- --ignored --nocapture -
Scalability - Tests performance impact of varying map sizes (100 to 5000 entries)
sudo -E cargo test benchmark_scalability_varying_map_sizes -- --ignored --nocapture
Expected Result:
BENCHMARK: Attack Scenario (Dropped Packets)
Pre-filled session map with 5000 entries
Generating 100 unique random packets...
Map contains 5000 authorized sessions
Running benchmark: 100 unique packets x 10000 repeats each
ATTACK SCENARIO RESULTS
Average Latency: 39.37 ns/packet
Throughput: 25400051 packets/sec
Map Size: 5000 sessions
Packets Tested: 1000000 (all accepted)
Status: PASS (< 2µs)
To build the optimized binary and check size:
cargo build --release
Key Features:
- Random IP generation for realistic traffic simulation
- Pre filled maps to stimulate real world
Related Skills
himalaya
336.9kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
336.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
336.9kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
83.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
