Repository navigation
1.0.0
BNG Blaster Controller 1.0.0
The first major release of the controller adds an embedded web UI, a much larger REST API, security hardening and a reworked Debian package.
Important
This release requires BNG Blaster 1.0.0 or newer.
Highlights
Embedded Web UI (experimental)
A browser UI served on http://<host>:8001/ to create, start, stop and watch test instances without calling the REST API directly. It is on by default. Turn it off with -ui=false.
- Dashboard with all test instances and New Test Instance: create from a form or edit as JSON, then create, or create and start. The form is checked against the BNG Blaster config schema, and the host network interfaces are offered in a dropdown.
- Per-instance views: overview; access, network and A10NSP interfaces; sessions; streams; BGP, with drill-down into each session, stream and BGP session.
- Interface stats show loss as a count and as a ratio (0.001 % resolution, red when above zero). Progress meters use 3 decimals and round down, so 9999/10000 no longer shows as 100 %.
- Commands: run any BNG Blaster control command and see its response.
- Log viewer, downloads (logs, reports, pcap and config) and uploads of test files into an instance.
- Instance controls: start, stop, kill and pause.
New REST endpoints
| Endpoint | Description |
|---|---|
GET /api/v1/schema |
BNG Blaster configuration JSON schema (-schema flag) |
GET /api/v1/interfaces |
Host network interfaces (-interfaces-api flag) |
GET /api/v1/instances/{name}/_overview |
Instance summary |
GET /api/v1/instances/{name}/_sessions |
Paginated session summary |
GET /api/v1/instances/{name}/_streams |
Paginated stream summary |
GET /api/v1/instances/{name}/_logs |
Instance log |
GET /api/v1/instances/{name}/_files |
List instance files |
GET /api/v1/instances/{name}/_files/{file} |
Download an instance file |
GET /docs/ |
Embedded Swagger UI and swagger.yaml |
Summary responses go through a short-lived per-instance cache. Concurrent requests for the same data share one control socket call, so many browser tabs do not overload bngblaster.
Security hardening
The API still has no authentication. Restrict who can reach the port: bind -addr to a management address, firewall it, or tunnel it through SSH. On top of that, the controller now:
- rejects state-changing requests that a browser sends on behalf of another site (checked via
Sec-Fetch-Site/Origin). curl and scripts are not affected. - supports
-allowed-hoststo protect against DNS rebinding, e.g.-allowed-hosts lab01,lab01.example.com. - sends a restrictive CSP,
X-Frame-Optionsand related headers on every response. - keeps uploads and downloads inside the instance folder. A relative
stream_configmust stay inside it too. An absolute path is passed tobngblasteras-is. - refuses uploads of run files, and refuses to act on PIDs ≤ 1.
- limits request sizes (32 MB per config, 4000 MB per upload) and rejects uploads larger than the free disk space.
- writes an audit log with the client address of every request and every lifecycle change.
Debian package and systemd
- New
/etc/default/rtbrick-bngblasterctrl(BNGBLASTERCTRL_OPTS) sets command-line flags. It is kept across upgrades. - New logrotate policy for
/var/log/rtbrick-bngblasterctrl-service-{out,err}.log. - Logs are now split: info and debug go to stdout, warnings and errors go to stderr.
- systemd sandboxing:
ProtectSystem=full,ProtectHome=read-only,PrivateTmp, plus kernel, clock and hostname protection. Home directories stay readable, so stream, BGP and MRT files kept there still work. - Upgrades keep the service state: a service that was enabled stays enabled, and the service is restarted only if it was running. Upgrading from 0.1.3 re-enables the service, which the old package's pre-removal script had disabled.
- Graceful shutdown: in-flight requests get up to 30 s to finish. File transfers no longer have a write deadline.
Fixes
- Stream
rx-pps/tx-ppsare decoded as fractional values. Before this fix, the newer BNG Blaster output broke the stream table and the Prometheus stream metrics. - Network interface multicast TX metrics came from the
rx-*keys and were always zero. - The web UI config editor could reopen an old version of
config.json.
Upgrade notes
Warning
Some defaults have changed. Check them before upgrading:
- Default
bngblasterpath is now/usr/bin/bngblaster(was/usr/sbin/bngblaster). Use-eto override. -uploadis now on by default (was off).-uiand-interfaces-apiare also on by default. For a REST-only controller, set-ui=false -interfaces-api=false -upload=false.- A relative
stream_configthat points outside the instance folder (e.g.../x) is now rejected. - BNG Blaster instances run in the service's control group. Stopping, restarting or upgrading the service stops every running test instance.
New flags
| Flag | Default | Description |
|---|---|---|
-ui |
true |
Serve the embedded web UI on / |
-interfaces-api |
true |
Enable /api/v1/interfaces |
-upload |
true (was false) |
Enable file upload |
-schema |
/usr/share/bngblaster/bngblaster-config.json |
Config schema served on /api/v1/schema |
-allowed-hosts |
(empty = any) | Allowed host names (protects against DNS rebinding) |
Maintenance
- Built with Go 1.27.1. Dependency bumps include
golang.org/x/net0.55.0 andgorilla/websocket1.5.3. - Moved to golangci-lint v2 and added a lint job to CI. GitHub Actions were updated.
- Each CI run now builds an installable dev
.deb, published as thebngblasterctrl-devworkflow artifact.
Installation
sudo dpkg -i bngblaster-controller_1.0.0_amd64.debSee the README for configuration details.
Full Changelog: 0.1.3...1.0.0