PiNetCore is a production-ready network appliance for Raspberry Pi 5. Full router control, real-time packet logging, nftables firewall, modular plugins (WireGuard VPN, Pi-hole DNS, Suricata IDS), React dashboard with live metrics.
Internet/WAN → Rust Core (pnet TAP/bridge + Axum API + SQLite) → Plugins → React Dashboard (Vite/Tailwind/Recharts)
- Packet capture/logging (Ethernet/IP/TCP/UDP → SQLite)
- nftables firewall (blacklist/whitelist)
- Plugin system (VPN/Pi-hole/Suricata ready)
- Axum REST + /metrics (Prometheus)
- React dashboard + real-time WebSocket
- Docker ARM + systemd deploy
- Pi5 LiteOS optimized
PiNetCore/
├── core-engine/ # Rust backend (Tokio/Axum/pnet/sqlx)
│ ├── src/{api,capture,firewall,plugins,storage}
│ ├── Cargo.toml
│ └── tests/
├── dashboard/ # React frontend (Vite/Tailwind/React Query)
│ ├── src/{components,hooks,services,store}
│ ├── package.json
│ └── tests/
├── deployments/ # Docker + systemd + Pi scripts
│ ├── docker/
│ ├── scripts/install_pi.sh
│ └── docker-compose.yml
└── configs/ # nftables/wireguard
git clone https://github.com/tworjaga/PiNetCore
cd PiNetCore
docker compose up -dAPI: http://localhost:8080/api/connections
Dashboard: http://localhost:3000
Metrics: http://localhost:8080/metrics
./deployments/scripts/install_pi.sh
sudo systemctl start pinetcore| Router | Bridge Mode | VLAN | ISP Modem |
|---|---|---|---|
| ASUS/TP-Link/Netgear | Yes | Yes | Yes |
| OpenWrt/DD-WRT | Yes | Yes | Yes |
| ISP Locked | Manual | No | No |
Backend (Rust)
Runtime: Tokio
Web: Axum
Packet: pnet
DB: sqlx (SQLite)
Firewall: nftables bindings
Frontend (TypeScript)
Framework: Vite + React 18
Styling: Tailwind CSS
Charts: Recharts
Query: TanStack Query
Infrastructure
Container: Docker ARM64
Compose: Multi-service stack
Deploy: systemd service
# Backend
cd core-engine
cargo test # Unit/integration
cargo clippy # Lints
# Frontend
cd dashboard
npm test # Vitest (100% coverage)
npm run build # Production build.env or core-engine/config.yaml:
database_url = "sqlite://pinetcore.db"
api_port = 8080
capture:
interface = "eth0"
firewall:
enabled = true
REST:
GET /api/connections # Recent connections
GET /health # Status
GET /metrics # Prometheus
Example:
curl http://localhost:8080/api/connectionsDocker Compose (Grafana/Prometheus/Loki ready):
docker compose -f docker-compose.monitoring.yml up -dPi Production:
./deployments/scripts/install_pi.shsudo systemctl enable pinetcoresudo systemctl status pinetcore
pub struct MyPlugin;
impl Plugin for MyPlugin {
fn name(&self) -> &str { "MyPlugin" }
fn start(&self) -> anyhow::Result<()> { Ok(()) }
}Register in main.rs → auto start/stop.
See CONTRIBUTING.md for guidelines on:
- Fork → feature branch
cargo fmt + cargo clippy- PR with tests
MIT License - see LICENSE for details.
Repository: https://github.com/tworjaga/PiNetCore
Telegram: @al7exy