AWS Security Groups and Ports
Use two security groups that reference each other by group ID rather than by CIDR. That way every new backend that carries the worker group is allowed automatically, without editing rules when private IPs change.
Create the groups first
- EC2 console › Network & Security › Security Groups › Create security group.
- Create
ws-gateway-sg(description: WebStream gateway control plane) in your VPC. Leave inbound empty for now. - Create
ws-backend-sg(description: WebStream static backend fleet) in the same VPC. - Note both group IDs (
sg-...). Create both before adding rules; each group’s rules reference the other.
Inbound rules on ws-gateway-sg
| Type | Port range | Source | Purpose |
|---|---|---|---|
| Custom TCP | 443 | Client CIDR (or My IP for PoC) | Browser client sessions |
| Custom TCP | 9000–9009 | Custom › ws-backend-sg | Framework services from backends |
| RDP | 3389 | Admin IP only | Administrative access |
The 9000–9009 block covers the ports that matter today and leaves room for another control-plane listener without a second change round:
- 9000 — gateway registration and heartbeats. Missing this produces a silent ~21-second connect timeout in the backend log.
- 9009 — Metrics Engine. Workers post metrics and activity events here directly; they are not proxied through the gateway. Missing this loses telemetry while everything else looks healthy.
- 9008 — Access Management API (standalone listener when used; reachable but not required for registration).
Keep the source set to ws-backend-sg. These are control-plane services; a CIDR source — and 0.0.0.0/0 in particular — is not an acceptable substitute.
Inbound rules on ws-backend-sg
| Type | Port range | Source | Purpose |
|---|---|---|---|
| Custom TCP | 9005 | Custom › ws-gateway-sg | Backend HTTP API — health checks, session coordination, teardown |
| Custom TCP | 9010–9251 | Custom › ws-gateway-sg | Streamer WebSockets and per-session HTTP for up to 25 sessions |
| RDP | 3389 | Admin IP only | Administrative access |
- 9005 is the port the backend advertises in
gateway/backend/advertisedUrl. The backend’s own pre-registration health check uses loopback, so it passes even when this rule is missing — the failure appears later as gateway-side health checks marking the backend unhealthy. - Do not add an RDP rule sourced from
ws-gateway-sg. Session RDP connections are made by the backend to itself over loopback; the gateway only speaks HTTP and WebSocket to the worker.
Streamer port maths (up to 25 sessions)
With the default basePortNumber of 9000, each pool account websNN binds two ports:
9000 + (NN × 10)— control / capture / audio WebSocket9000 + (NN × 10) + 1— per-session HTTP file server
Ports +2…+9 in each decade are unused. Examples:
| Account | WebSocket | HTTP |
|---|---|---|
webs01 | 9010 | 9011 |
webs02 | 9020 | 9021 |
webs25 | 9250 | 9251 |
For a 25-session pool the AWS security-group range must be 9010–9251 (general form: 9010 to 9000 + N × 10 + 1). If you size a node smaller, you may narrow the upper bound accordingly, but leaving 9251 open on the group is harmless and avoids a second change when you raise Max Sessions later.
Windows Firewall alignment
Post-install Step 3 creates a WebStream Streamers rule from the pool size. After changing Max Sessions or the pool, re-run:
C:\WebStream\Scripts\setup-server.ps1 -InstallMode Backend -UserCount 25 -ConfigureAll -Force
The generated Windows rule currently ends at 9000 + N × 10 (for 25 users: 9010-9250). The last slot’s HTTP port (9251) sits one port outside that rule. Until this is corrected in the installer scripts, widen the local rule by hand to match the AWS range (9010-9251), or file transfers on the top pool slot will fail while the WebSocket still connects.
Outbound
Leave the default “All traffic to 0.0.0.0/0” outbound rule on both groups. If your organisation removes it:
- Backends need outbound TCP 9000 and 9009 to
ws-gateway-sg. - The gateway needs outbound 443 if it must reach external licence or AWS APIs.
Attach and verify
- Attach
ws-gateway-sgto the gateway instance andws-backend-sgto every backend. - From a backend:
Both should returnTest-NetConnection <gateway-private-ip> -Port 9000 Test-NetConnection <gateway-private-ip> -Port 9009Truein under a second. - From the gateway (or an admin host that can reach the worker):
Test-NetConnection <backend-private-ip> -Port 9005 Test-NetConnection <backend-private-ip> -Port 9010
Roughly 21 seconds then False means packets are being dropped (security group or NACL). Under a second then False means active refusal (service not listening). Time it with Measure-Command { Test-NetConnection <ip> -Port 9000 -InformationLevel Quiet } — the PowerShell error text is identical in both cases.