"xx-xx is not a valid port. The port number must be between 0 and 65535" error when creating a NAT rule in VMware Cloud Director 10.2.x, 10.3.x and 10.4 versions
book
Article ID: 325653
calendar_today
Updated On:
Products
VMware Cloud Director
Issue/Introduction
Symptoms:
Creating a NAT rule in VMware Cloud Director 10.2.x,10.3.x and 10.4 versions fails with:
xx-xx is not a valid port. The port number must be between 0 and 65535
Unable to configure the range of an external port in an NSX-T backed Cloud Director environment.
Environment
VMware Cloud Director 10.x
Cause
This is a UI defect affecting VMware Cloud Director 10.2.x,10.3.x and 10.4 versions.
Resolution
This is a known issue affecting VMware Cloud Director 10.2.x,10.3.x and 10.4 versions. This issue will be resolved in a later release of Cloud Director.
For a workaround, please use the workaround specified in the Workaround section.
Workaround:
Identify the gateway ID to be updated.This can be retrieved from the URL, in the Provider Portal > Resources > Cloud Resources > Edge Gateways > Click on the Edge Gateway > On the URL of the UI,look for urn:vcloud:gateway:XXXXXX
Identify the ID of the NAT rule to be updated. Execute the API request GET /1.0.0/edgeGateways/{gatewayId}/nat/rules to get the list of all the NAT rules on the edge. Note the "id" value and the details of the rule to be updated from the output.
Execute the request PUT /1.0.0/edgeGateways/{gatewayId}/nat/rules/{ruleId}.
Edit the body as required. In the "dnatExternalPort" field of the body, the port ranges can be specified. Example: