Network Topology
ML Defender operates in two modes:Host-Based IDS Mode
Gateway Mode (Dual-NIC)
Vagrant Multi-VM Deployment
Recommended for development, testing, and gateway mode validation.
Prerequisites
Deployment Steps
1
Clone repository
2
Start Defender VM (development mode)
- Debian Bookworm 12 (8GB RAM, 6 CPUs)
- Dual-NIC configuration (eth1: WAN, eth3: LAN)
- IP forwarding and NAT for gateway mode
- All dependencies (eBPF, ONNX Runtime, etcd, llama.cpp)
- Pre-built components
3
Start Client VM (gateway testing)
- IP: 192.168.100.50
- Gateway: 192.168.100.1 (defender eth3)
- Includes attack simulation tools (hping3, nmap, tcpreplay)
4
Verify network configuration
5
Build components
6
Start the pipeline
Service Startup Order
- Firewall ACL Agent (SUB socket on :5572) - Must bind first
- ML Detector (PUB socket on :5572) - Connects to firewall
- Sniffer (PUSH socket to :5571) - Sends to detector
run_lab_dev.sh script handles this automatically:
source/scripts/run_lab_dev.sh
Docker Compose Deployment
Recommended for containerized environments and CI/CD pipelines.
Prerequisites
Deployment Steps
1
Configure services
Review
docker-compose.yaml:source/docker-compose.yaml
2
Build images
3
Start services
4
Verify deployment
Health Checks
All services include health checks:Debian Package Deployment
Recommended for production deployments on Debian/Ubuntu servers.
Package Information
ML Defender provides asniffer-ebpf package:
source/debian/control
Build Package
1
Install build dependencies
2
Build Debian package
3
Install package
4
Configure service
Systemd Service
The package includes a systemd service unit:source/debian/sniffer-ebpf.service
Health Checks and Verification
Component Status
Port Verification
IPSet Verification
Log Verification
Pipeline Verification
Performance Verification
Network Capture Verification
Stopping and Cleanup
Vagrant
Docker Compose
Debian Package
Next Steps
Monitoring
Set up monitoring and observability
Performance Tuning
Optimize for your workload
Troubleshooting
Diagnose and fix issues
Configuration
Configure components