A lightweight home network scanner and inventory dashboard. Sweeps your subnet with nmap, tracks every host it finds, and serves a clean web dashboard — all as a single systemd service.
- Automatic subnet sweep on startup and on a configurable interval
- MAC → vendor lookup (built-in table + optional full IEEE OUI file)
- Reverse DNS resolution for hostnames
- Open port detection across common services (SSH, HTTP, RDP, etc.)
- Persistent SQLite database — history survives restarts
- Live web dashboard with search, filter, and manual scan trigger
- Zero runtime dependencies beyond Python 3 + Flask + nmap
- Linux host (tested on Ubuntu 22.04 / Debian 12 / Raspberry Pi OS)
- Python 3.9+
nmap(installed automatically byinstall.sh)- Root /
sudo(nmap needs raw sockets for ARP/MAC detection)
git clone https://github.com/YOUR_USERNAME/netinventory.git
cd netinventory
sudo bash install.shThe installer will:
- Auto-detect your subnet
- Ask for port and scan interval
- Install
nmap+flaskvia apt/pip - Copy files to
/opt/netinventory/ - Enable and start the
systemdservice
Then open http://<your-host-ip>:8080 in a browser.
All settings are environment variables in the systemd service file (/etc/systemd/system/netinventory.service):
| Variable | Default | Description |
|---|---|---|
NETINV_SUBNET |
192.168.1.0/24 |
Subnet to scan |
NETINV_PORT |
8080 |
Web dashboard port |
NETINV_INTERVAL |
300 |
Seconds between scans |
NETINV_DB |
/var/lib/netinventory/hosts.db |
SQLite database path |
NETINV_LOGLEVEL |
INFO |
DEBUG, INFO, WARNING |
After editing the service file, reload with:
sudo systemctl daemon-reload && sudo systemctl restart netinventorypython3 -m venv venv
venv/bin/pip install flask
sudo NETINV_SUBNET=192.168.1.0/24 NETINV_DB=/tmp/hosts.db venv/bin/python app.pyThe built-in vendor table covers ~40 common manufacturers. For full coverage, download the IEEE OUI list:
wget -O /opt/netinventory/oui.txt https://standards-oui.ieee.org/oui/oui.txt
sudo systemctl restart netinventory| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Web dashboard |
/api/hosts |
GET | All hosts as JSON |
/api/stats |
GET | Summary stats + scan history |
/api/scan |
POST | Trigger an immediate scan |
journalctl -u netinventory -f # live logs
systemctl status netinventory # service status
systemctl restart netinventory # restart
sudo bash uninstall.sh # remove everythingnetinventory/
├── app.py # Flask app + scanner engine
├── templates/
│ └── index.html # Dashboard (single-file, no build step)
├── install.sh # Interactive installer
├── uninstall.sh # Removal script
├── netinventory.service # Systemd unit (reference copy)
├── requirements.txt
└── README.md
MIT
