dcstephenson 7233386d36 Disable telnet in generated configs; mount templates volume
- Add "no ip telnet" to generated switch configs for security
- Bind-mount templates/ into the container (read-only) so template
  edits take effect without a rebuild, matching config.py/configs/

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CLfUJoQTaUePx1m1d2v2j9
2026-08-18 11:24:48 -05:00
2026-05-05 19:57:47 +00:00
2026-05-05 19:57:47 +00:00
2026-05-05 19:57:47 +00:00
2026-05-05 19:57:47 +00:00
2026-05-05 20:11:51 +00:00
2026-05-05 19:57:47 +00:00

Switch Config Manager

Web-based tool for writing, saving, and pushing configuration files to network switches. Pulls switch inventory from NocoDB and provides a browser UI for editing and deploying configs.

Features

  • Lists active switches from NocoDB (filterable by department)
  • Config editor — write or paste switch configuration in the browser
  • Save configs to disk as hostname.conf files
  • Push configs to switches via SSH (Paramiko)
  • Web access shortcut — open the switch management UI directly from the app

Quick Start

1. Configure

Copy config.example.py to config.py and fill in your values:

cp config.example.py config.py
nano config.py
NOCODB_URL      = "http://your-nocodb-host:8080"
NOCODB_TOKEN    = "your-api-token"
NOCODB_BASE_ID  = "your-base-id"
NOCODB_TABLE_ID = "your-table-id"
CONFIGS_DIR     = "/configs"

2. Build and run

docker compose up -d --build

The app runs on port 8003 by default.

3. Open the UI

http://your-host-ip:8003

NocoDB Requirements

The NocoDB table must have at minimum:

Column Description
Hostname Switch hostname (used as filename)
Active Must be YES for the switch to appear
Dept Department code — used for filtering

Project Structure

switch-config-manager/
├── app.py              # Flask API + SSH push logic
├── config.py           # Your local config (not committed)
├── config.example.py   # Config template
├── requirements.txt    # Python dependencies
├── Dockerfile
├── docker-compose.yml
├── templates/
│   └── index.html      # Web UI
└── configs/            # Saved .conf files (created at runtime)

Saved Configs

Config files are saved to the configs/ directory as hostname.conf. The directory is bind-mounted from the host so files persist across container restarts.

S
Description
Web-based tool for writing, saving, and pushing configuration files to network switches. NocoDB inventory, browser config editor.
Readme 139 KiB
Languages
HTML 88.6%
Python 11%
Dockerfile 0.4%