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

  1. EC2 console › Network & SecuritySecurity GroupsCreate security group.
  2. Create ws-gateway-sg (description: WebStream gateway control plane) in your VPC. Leave inbound empty for now.
  3. Create ws-backend-sg (description: WebStream static backend fleet) in the same VPC.
  4. Note both group IDs (sg-...). Create both before adding rules; each group’s rules reference the other.

Inbound rules on ws-gateway-sg

TypePort rangeSourcePurpose
Custom TCP443Client CIDR (or My IP for PoC)Browser client sessions
Custom TCP9000–9009Custom › ws-backend-sgFramework services from backends
RDP3389Admin IP onlyAdministrative access

The 9000–9009 block covers the ports that matter today and leaves room for another control-plane listener without a second change round:

Warning

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

TypePort rangeSourcePurpose
Custom TCP9005Custom › ws-gateway-sgBackend HTTP API — health checks, session coordination, teardown
Custom TCP9010–9251Custom › ws-gateway-sgStreamer WebSockets and per-session HTTP for up to 25 sessions
RDP3389Admin IP onlyAdministrative access

Streamer port maths (up to 25 sessions)

With the default basePortNumber of 9000, each pool account websNN binds two ports:

Ports +2+9 in each decade are unused. Examples:

AccountWebSocketHTTP
webs0190109011
webs0290209021
webs2592509251

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
Warning

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:

Attach and verify

  1. Attach ws-gateway-sg to the gateway instance and ws-backend-sg to every backend.
  2. From a backend:
    Test-NetConnection <gateway-private-ip> -Port 9000
    Test-NetConnection <gateway-private-ip> -Port 9009
    Both should return True in under a second.
  3. 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
Tip

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.