4. Create VPC and Firewall Rules
Your GCP environment should have a
default VPC, which can be used for autoscaling. However if you wish, you can also use a separate network for Red5 Pro autoscaling.
- Navigate to VPC network and click on CREATE VPC NETWORK
- Provide appropriate details for the new VPC form
- Name: Specify a name for the VPC such as
- Description: Add a description for the VPC.
- Select Automatic subnet creation mode, to generate subnets in all regions.
- Select all essential Firewall rules for your VPC except
- Select a Dynamic routing mode according to your needs or just leave it to default.
Createto create VPC
- Under VPC Network tab -> Firewall Rules, Click on
CREATE FIREWALL RULE. Add a new firewall rule to the network profile you wish to use for autoscaling.
- Name: Specify a name for the rule such as
- Description: Add a description
- Logs: Leave to default (off)
- Network: Make sure
defaultnetwork is selected
- Priority: Leave to default
- Direction of traffic: Leave to default (
- Action on match: Leave to default (
- Targets: All instances in the network
- Source Filter: IP Ranges
- Source IP Ranges:
- Second Source Filter: Leave to default
- Protocols & Ports: Select Specified Protocols & Ports and enter the following ports for mentioned protocols.
Createto create rule
|5080||default web access of Red5 Pro/Websockets for WebRTC / Stream Manager||TCP|
|443||modified https access of Red5 Pro; secure websockets for WebRTC / Stream Manager||TCP|
|1935||default Red5 Pro RTMP port||TCP|
|8554||default RTSP port||TCP|
|6262||websockets for HLS||TCP|
|8081||websockets for WebRTC (severs earlier than 5.4.0)||TCP|
|8083||secure websockets for WebRTC (severs earlier than 5.4.0)||TCP|
|40000-65535||TURN/STUN/ICE port range for WebRTC||UDP|
NOTE: As of release 5.4.0,
websockets automatically use the same ports as http/https as defined in
red5.properties, so you do not need to open up ports 8081/8083.