addPortForwardingRules
- Print
- PDF
addPortForwardingRules
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Adds port forwarding rules. You can add a port forwarding rule to your server and access it with the public IP address and port.
Request
Request parameters
Parameter | Required | Type | Limitations | Description |
---|---|---|---|---|
portForwardingConfigurationNo | Y | String | Port forwarding configuration number Get available values by using the getPortForwardingRuleList action. | |
portForwardingRuleList.N.serverInstanceNo | Y | List<String> | Port forwarding rule list.N.server instance number Server instance number to set port forwarding for Get a serverInstanceNo by using the getServerInstanceList action. Example) portForwardingRuleList.1.serverInstanceNo=1088217 | |
portForwardingRuleList.N.portForwardingExternalPort | Y | List<String> | Min: 1, Max: 65534 | Port forwarding rule list.N.port forwarding external port External port for port forwarding The external port number can range from 1,024 to 65,534, and the external port cannot be used for services other than server login. Example) portForwardingRuleList.1.portForwardingExternalPort=9090 |
portForwardingRuleList.N.portForwardingInternalPort | Y | List<String> | Min: 1, Max: 65534 | Port forwarding rule list.N.port forwarding internal port Internal port to for port forwarding Only the following ports are available. [Linux: 22 \ Windows: 3389] Example) portForwardingRuleList.1.portForwardingInternalPort=22 |
Response
Response body
Examples
Request example
GET {SERVER_API_URL}/addPortForwardingRules
?portForwardingConfigurationNo=31260
&portForwardingRuleList.1.serverInstanceNo=1088217
&portForwardingRuleList.1.portForwardingExternalPort=9090
&portForwardingRuleList.1.portForwardingInternalPort=22
Response example
<addPortForwardingRulesResponse>
<requestId>1e50cd88-32cb-422d-bf63-fefbbbb805bc</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>1</totalRows>
<portForwardingRuleList>
<portForwardingRule>
<portForwardingConfigurationNo>31260</portForwardingConfigurationNo>
<portForwardingPublicIp>106.10.51.90</portForwardingPublicIp>
<zone>
<zoneNo>3</zoneNo>
<zoneName>KR-2</zoneName>
<zoneCode>KR-2</zoneCode>
<zoneDescription>평촌 zone</zoneDescription>
<regionNo>1</regionNo>
</zone>
<portForwardingExternalPort>9090</portForwardingExternalPort>
<portForwardingInternalPort>22</portForwardingInternalPort>
<serverInstance>
<serverInstanceNo>1088217</serverInstanceNo>
<serverName>s167545541a3</serverName>
<serverDescription></serverDescription>
<cpuCount>4</cpuCount>
<memorySize>8589934592</memorySize>
<baseBlockStorageSize>53687091200</baseBlockStorageSize>
<platformType>
<code>LNX32</code>
<codeName>Linux 32 Bit</codeName>
</platformType>
<loginKeyName>juhoon-kim</loginKeyName>
<isFeeChargingMonitoring>false</isFeeChargingMonitoring>
<publicIp></publicIp>
<privateIp>10.41.83.168</privateIp>
<serverImageName>centos-6.3-32</serverImageName>
<serverInstanceStatus>
<code>RUN</code>
<codeName>Server run state</codeName>
</serverInstanceStatus>
<serverInstanceOperation>
<code>NULL</code>
<codeName>Server NULL OP</codeName>
</serverInstanceOperation>
<serverInstanceStatusName>running</serverInstanceStatusName>
<createDate>2018-11-27T17:42:13+0900</createDate>
<uptime>2018-11-27T18:35:47+0900</uptime>
<serverImageProductCode>SPSW0LINUX000032</serverImageProductCode>
<serverProductCode>SPSVRSTAND000005</serverProductCode>
<isProtectServerTermination>false</isProtectServerTermination>
<portForwardingPublicIp>106.10.51.90</portForwardingPublicIp>
<portForwardingExternalPort>9090</portForwardingExternalPort>
<portForwardingInternalPort>22</portForwardingInternalPort>
<zone>
<zoneNo>3</zoneNo>
<zoneName>KR-2</zoneName>
<zoneCode>KR-2</zoneCode>
<zoneDescription>평촌 zone</zoneDescription>
<regionNo>1</regionNo>
</zone>
<region>
<regionNo>1</regionNo>
<regionCode>KR</regionCode>
<regionName>Korea</regionName>
</region>
<baseBlockStorageDiskType>
<code>NET</code>
<codeName>Network Storage</codeName>
</baseBlockStorageDiskType>
<baseBlockStorageDiskDetailType>
<code>HDD</code>
<codeName>HDD</codeName>
</baseBlockStorageDiskDetailType>
<serverInstanceType>
<code>STAND</code>
<codeName>Standard</codeName>
</serverInstanceType>
<userData></userData>
<accessControlGroupList>
<accessControlGroup>
<accessControlGroupConfigurationNo>39995</accessControlGroupConfigurationNo>
<accessControlGroupName>ncloud-default-acg</accessControlGroupName>
<accessControlGroupDescription>Default AccessControlGroup</accessControlGroupDescription>
<isDefault>true</isDefault>
<createDate>2018-04-09T11:12:54+0900</createDate>
</accessControlGroup>
</accessControlGroupList>
<instanceTagList/>
</serverInstance>
</portForwardingRule>
</portForwardingRuleList>
</addPortForwardingRulesResponse>
Error codes
Errors that may occur while using this action are listed below. For information on common errors, refer to NAVER Cloud Platform API.
HTTP response code | Return code | Return message |
---|---|---|
400 | 26035 | Not found certificateName. Please check your input parameter. |
400 | 25033 | Currently port forwarding setting is being created/ modifying/ deleting. Please try again a few seconds later. |
400 | 24068 | {0} cannot be controlled. instanceNo = {1} |
400 | 24069 | Invalid internal port has been configured. Usable internal port(LINUX type : 22, WINDOWS type : 3389) |
400 | 24070 | A single external port number is used in multiple rules. External port number : {0} |
400 | 24071 | Single server is existing in multiple rules. Server IP address : {0} |
400 | 24074 | External internal port as well as server instance number are not designated to port forward rule. |
Was this article helpful?