2026-03-08 15:40:11 -05:00
2026-03-08 15:06:50 -05:00
2026-03-08 15:06:50 -05:00
2026-03-08 15:06:50 -05:00
2026-03-08 15:23:20 -05:00
2026-03-08 15:17:56 -05:00
2026-03-08 15:17:56 -05:00
2026-03-08 15:06:50 -05:00

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 nmap OS detection capabilities may require elevated privileges. The app automatically falls back if OS detection fails.

API Endpoints

  • GET /api/health
  • GET /api/devices
  • GET /api/devices/{id}
  • GET /api/scans?limit=20
  • POST /api/scans/run?subnet=192.168.2.0/24
Description
No description provided
Readme 74 KiB
Languages
Python 64.1%
JavaScript 20.5%
CSS 10.3%
HTML 4.3%
Dockerfile 0.8%