a16014ca47a11a37e9eb07475d1a3ed523bdba1c
NetTrak
NetTrak is a Dockerized network inventory web app that scans a subnet and catalogs:
- Devices discovered on the network
- Open ports per device
- Service fingerprint details from
nmap - HTTP headers and lightweight banners when available
Results are persisted in SQLite for change tracking (new/updated/missing devices and ports).
Features
- Dark mode UI by default
- 3-pane layout:
- Left: discovered machines
- Right-top: selected machine details
- Right-bottom: collapsible port records with headers/banners
- Background scan execution
- SQLite persistence for historical tracking
Tech Stack
- Backend: FastAPI + SQLite
- Scanner:
nmap+ lightweight Python probes - Frontend: Static HTML/CSS/JS
- Deployment: Docker / Docker Compose
Run With Docker Compose
docker compose up --build
Then open: http://localhost:1337
Database file is stored at ./data/nettrak.db via a bind mount.
Configuration
Environment variables:
NETTRAK_DB_PATH(default:/data/nettrak.db)NETTRAK_SUBNET(default:192.168.2.0/24)
In Compose, these are already set.
LAN Scanning Notes
- LAN host discovery can be limited in bridged container networking.
- For best results on Linux hosts, enable host networking in
docker-compose.yml:
network_mode: host
- Some
nmapOS detection capabilities may require elevated privileges. The app automatically falls back if OS detection fails.
API Endpoints
GET /api/healthGET /api/devicesGET /api/devices/{id}GET /api/scans?limit=20POST /api/scans/run?subnet=192.168.2.0/24
Description
Languages
Python
64.1%
JavaScript
20.5%
CSS
10.3%
HTML
4.3%
Dockerfile
0.8%