Create a Port Forwarding Rule
On the main menu of ZStack Cloud, choose . On the Port Forwarding page, click Create Port Forwarding. Then, the Create Port Forwarding page is displayed.
On the displayed page, set the following parameters:
- Name: Enter a name for the port forwarding rule.
The name must be 1 to 128 characters in length and can contain letters, digits, hyphens (-), underscores (_), periods (.), parenthesis (), colons (:), and plus signs (+).
- Description: Optional. Enter a description for the port forwarding rule.
- VIP: You can create a VIP or use an existing VIP to
provide port forwarding services.
- Create VIP: Create a VIP. If
you select to create a VIP, set the following parameters:
- Network: Select a public network to create a VIP.
- Network Range: Optional. Select a network range. If you selected an IPv4 public network, you can select a normal network range or an address pool.
- Assign IP: Optional. You can assign a virtual IP address. If left blank, the system automatically assigns a VIP.
- Use Existing VIP: Use an existing VIP. If you
select to use an existing VIP, set the following parameters:
- VIP: Select an existing VIP.
Note: The system VIP of a VPC vRouter can be used to provide port forwarding services.
- Create VIP: Create a VIP. If
you select to create a VIP, set the following parameters:
- Protocol: Select a protocol, Valid
values: TCP and UDP.
- TCP: supports ports 0-65535.
- UDP: supports ports 0-65535.
- Port: Select a port mapping method.
Two port mapping methods are supported: port-to-port mapping and port range-based mapping.
- Specified Port: If you specify ports, set the
following parameters:
- Source Port: Select a port from ports 0-65535 as the source port.
- VM Port: Select a port from ports 0-65535 as the VM port.
For example, if you set 24 as the source port and 22 as the VM port, the traffic to port 24 of the public IP will be forwarded to port 22 of the VM instance.
- Port Range: Select two ports from ports 1-65535
as the start port and end port, respectively.
For example, if the port range is 22-80, traffic to ports 22-80 of the public IP will be forwarded to ports 22-80 of the VM instance.
- Specified Port: If you specify ports, set the
following parameters:
- Allowed CIDR: Optional. You can specify a CIDR block to allow access to only this CIDR block.
