Skip to content

Network restriction

An edge streamer serves media to the internet, but the same HTTP port also exposes the admin API, the console, metrics and diagnostics. The network restriction closes the management plane to trusted networks while playback, publishing and the cluster's own traffic keep working.

The restriction is a list of IPv4/IPv6 addresses and CIDRs in the management_allowed_ips setting. When the list is set, a management route answers a request from any other address with 403 and no redirect. When the list is absent or empty, nothing is restricted.

What is management and what is not

The split is fixed in code, not configurable:

  • Media stays public — HLS, DASH, MPEG-TS/fMP4 fragments, previews, VOD, legacy playback routes, publishing (MPEG-TS push, WHIP/WHEP) and signed VOD upload. These keep their usual authorization: play tokens, publish sessions, upload grants.
  • Management is everything else — the admin API (v3/v4), the console and its assets, metrics, diagnostics, ONVIF relay, the built-in reverse proxy when it actually executes a request, NMOS on both the shared and the dedicated listener, and any route the server does not recognize. The health check is management too: a load balancer probing the server must sit in an allowed network.

Authorization does not go away: a permitted address still has to pass the usual login, API keys and roles. The restriction narrows who can knock, not who is admitted.

Setting the policy

For a cluster the policy lives in the central console, section Settings → Management API restriction. Three states:

  • Not set (inherit) — the value of the less specific layer applies; for a managed streamer that is its local configuration.
  • Disabled (all networks) — saved as an empty list []; explicitly turns the restriction off and overrides the lower layers.
  • Allowed networks — one address or CIDR per line.

The server stores and returns the canonical form: a bare address becomes 192.0.2.10/32 or 2001:db8::10/128, host bits of a CIDR are masked (198.51.100.77/24 is stored as 198.51.100.0/24). The order of entries is preserved. A typo in a line is rejected on save: 422 with the path to the entry, and the field shows the message.

The form warns before saving a non-empty list: make sure the network you are connecting from is in it, or the console itself becomes unreachable. If that happens, fix the setting from a machine inside an allowed network (or over an out-of-band path such as the hypervisor console). There is no automatic "allow my current address" mechanism.

For a standalone streamer without central, the same setting is a top-level management_allowed_ips field of the server configuration.

Layers and the streamer card

The policy is assembled from layers, strongest last: the main file, then central, then drop-in files on the machine. Only files named *.json or *.conf inside the configuration's .d directory are read as drop-ins — a *.yaml file there is silently ignored, so name drop-ins accordingly or the list in them will not apply. On managed streamers central delivers its setting as a read-only projection; there is no per-machine override. If a streamer document happens to carry its own management_allowed_ips, the server rejects the write with 422 and does not change the document; a stale saved key can be removed by writing null, which cleans the projection without touching the common policy.

The streamer card shows both sides separately:

  • Set in central — the common policy from the settings page.
  • Applied by the node (last report) — the list the machine actually enforces, from its latest report, with the time that report was received.

The two can differ: a local drop-in on the machine overrides central, and the card says so. An empty reported list means the machine has the restriction off; a missing report means no data, not an off restriction — the common policy is never substituted for a missing report. If the machine goes offline, the last reported list stays on the card marked as unconfirmed.

How a request is checked

Only the peer address of the TCP connection is checked. X-Forwarded-For, X-Real-IP and Forwarded are ignored: the playback-side trusted proxies do not influence management, and a spoofed header changes nothing. An IPv4 address written in the IPv4-mapped IPv6 form matches an IPv4 list entry as well; an explicit IPv6 network keeps its own matching.

Allowing a reverse proxy means trusting every request from its address: the streamer cannot tell the proxy's clients apart. Put the management path on a direct LAN/VPN route, or enforce your own allowlist on the proxy.

Applying and delivery

The restriction applies hot, from the active configuration snapshot: changing the list neither rebinds listeners nor interrupts playback. A managed streamer starts from its saved configuration even with no link to central; once central's part arrives it is layered on top. A failed reload before the apply keeps the previous policy; a partial apply (for example, the new list published but another stage failed) leaves the new list in force together with the error — the card shows the fact and config_error separately, and there is no silent rollback. A broken drop-in file is skipped with a warning as before: if it carried the strictest list, the effective policy may weaken, so keep drop-ins under review.

Embedded central

When central runs on the same machine as the streamer (embedded delivery), it accepts, stores and delivers the setting to managed streamers, but does not apply it to its own management routes yet — the node's card in the machine list shows this directly: "set in central" is there while "applied by the node" reads "off", with an explanation. A saved list does not mean central itself is protected: managed streamers enforce the policy regardless.

Rollback and downgrade

Rolling the streamer package back removes the setting from its local configuration files; the copy central saved and the locally cached delivered configuration survive and come back with the next upgrade. Rolling central alone back can deliver a streamer document without the field and lift the common policy on new streamers. After upgrading central again, save the desired list in the common settings once more (even if it is already there — save the same text again) and check on the streamer cards that it was applied: a restart or an untouched document is not enough by itself to restore delivery.

What the restriction is not

  • Not a firewall: it guards the HTTP management routes of the server, not the machine. OS-level filtering is still yours.
  • Not an authorization replacement: logins, tokens and roles keep working as before.
  • Not a restriction of media protocols: RTSP, RTMP, SRT and other non-HTTP protocols are outside this mechanism.