addPortForwardingRules
- Print
- PDF
addPortForwardingRules
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Adding a port forwarding rule
Description
Add a port forwarding rule.
By adding a port forwarding rule to your server,
you can access a port forwarding public IP.
Request Parameters
Parameter Name | Requiredness | Type | Limitation | Description |
---|---|---|---|---|
portForwardingConfigurationNo | Yes | String | Port forwarding configuration No. Key value created for port forwarding on NAVER Cloud Platform | |
portForwardingRuleList.serverInstanceNo | Yes | String | Server instance No. where port forwarding is configured | |
portForwardingRuleList.portForwardingExternalPort | Yes | String | Min : 1, Max : 65534 | External port to access port forwarding |
portForwardingRuleList.portForwardingInternalPort | Yes | String | Min : 1, Max : 65534 | Internal port to access port forwarding You can enter only the following ports. [Linux : 22 | Windows : 3389] |
Response Data Type
- PortForwardingRuleList type
PortForwardingRuleList extends CommonResponse |
---|
private Integer totalRows; |
private List |
PortForwardingRule |
---|
private String portForwardingConfigurationNo; |
private String portForwardingPublicIp; |
private Zone zone; |
private Integer portForwardingExternalPort; |
private Integer portForwardingInternalPort; |
private ServerInstance serverInstance; |
Examples
Request
ncloud server addPortForwardingRules --portForwardingConfigurationNo 2187 --portForwardingRuleList "serverInstanceNo=397364,portForwardingExternalPort=4250,portForwardingInternalPort=22"
Response
{
"addPortForwardingRulesResponse": {
"requestId": "b36cae4a-6ef2-41e2-85c6-1a9d885eaecb",
"returnCode": "0",
"returnMessage": "success",
"totalRows": 1,
"portForwardingRuleList": [
{
"portForwardingConfigurationNo": "2187",
"portForwardingPublicIp": "192.168.120.111",
"zone": {
"zoneNo": "2",
"zoneName": "KR-1",
"zoneDescription": "KR-1 zone"
},
"portForwardingExternalPort": 4250,
"portForwardingInternalPort": 22,
"serverInstance": {
"serverInstanceNo": "397364",
"serverName": "ncloud-mktest3",
"serverDescription": "",
"cpuCount": 2,
"memorySize": 2147483648,
"baseBlockStorageSize": 53687091200,
"platformType": {
"code": "LNX64",
"codeName": "Linux 64 Bit"
},
"loginKeyName": "ysw",
"isFeeChargingMonitoring": false,
"publicIp": "",
"privateIp": "10.113.245.164",
"serverImageName": "centos-7.3-64",
"serverInstanceStatus": {
"code": "NSTOP",
"codeName": "Server normal stopped state"
},
"serverInstanceOperation": {
"code": "NULL",
"codeName": "Server NULL OP"
},
"serverInstanceStatusName": "stopped",
"createDate": "2018-02-23T15:44:59+0900",
"uptime": "2018-02-23T15:57:56+0900",
"serverImageProductCode": "SPSW0LINUX000046",
"serverProductCode": "SPSVRSTAND000049",
"isProtectServerTermination": false,
"portForwardingPublicIp": "192.168.120.111",
"portForwardingExternalPort": 4250,
"portForwardingInternalPort": 22,
"zone": {
"zoneNo": "2",
"zoneName": "KR-1",
"zoneDescription": "KR-1 zone"
},
"region": {
"regionNo": "1",
"regionCode": "KR",
"regionName": "Korea"
},
"baseBlockStorageDiskType": {
"code": "NET",
"codeName": "Network Storage"
},
"baseBlockStroageDiskDetailType": {
"code": "HDD",
"codeName": "HDD"
},
"userData": "",
"accessControlGroupList": [
{
"accessControlGroupConfigurationNo": "1038",
"accessControlGroupName": "ncloud-default-acg",
"accessControlGroupDescription": "Default AccessControlGroup",
"isDefault": true,
"createDate": "2013-12-03T10:37:39+0900"
}
]
}
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<addPortForwardingRulesResponse>
<requestId>b36cae4a-6ef2-41e2-85c6-1a9d885eaecb</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>1</totalRows>
<portForwardingRuleList>
<portForwardingRule>
<portForwardingConfigurationNo>2187</portForwardingConfigurationNo>
<portForwardingPublicIp>192.168.120.111</portForwardingPublicIp>
<zone>
<zoneNo>2</zoneNo>
<zoneName>KR-1</zoneName>
<zoneDescription>KR-1 zone</zoneDescription>
</zone>
<portForwardingExternalPort>4250</portForwardingExternalPort>
<portForwardingInternalPort>22</portForwardingInternalPort>
<serverInstance>
<serverInstanceNo>397364</serverInstanceNo>
<serverName>ncloud-mktest3</serverName>
<serverDescription></serverDescription>
<cpuCount>2</cpuCount>
<memorySize>2147483648</memorySize>
<baseBlockStorageSize>53687091200</baseBlockStorageSize>
<platformType>
<code>LNX64</code>
<codeName>Linux 64 Bit</codeName>
</platformType>
<loginKeyName>ysw</loginKeyName>
<isFeeChargingMonitoring>false</isFeeChargingMonitoring>
<publicIp></publicIp>
<privateIp>10.113.245.164</privateIp>
<serverImageName>centos-7.3-64</serverImageName>
<serverInstanceStatus>
<code>NSTOP</code>
<codeName>Server normal stopped state</codeName>
</serverInstanceStatus>
<serverInstanceOperation>
<code>NULL</code>
<codeName>Server NULL OP</codeName>
</serverInstanceOperation>
<serverInstanceStatusName>stopped</serverInstanceStatusName>
<createDate>2018-02-23T15:44:59+0900</createDate>
<uptime>2018-02-23T15:57:56+0900</uptime>
<serverImageProductCode>SPSW0LINUX000046</serverImageProductCode>
<serverProductCode>SPSVRSTAND000049</serverProductCode>
<isProtectServerTermination>false</isProtectServerTermination>
<portForwardingPublicIp>192.168.120.111</portForwardingPublicIp>
<portForwardingExternalPort>4250</portForwardingExternalPort>
<portForwardingInternalPort>22</portForwardingInternalPort>
<zone>
<zoneNo>2</zoneNo>
<zoneName>KR-1</zoneName>
<zoneDescription>KR-1 zone</zoneDescription>
</zone>
<region>
<regionNo>1</regionNo>
<regionCode>KR</regionCode>
<regionName>Korea</regionName>
</region>
<baseBlockStorageDiskType>
<code>NET</code>
<codeName>Network Storage</codeName>
</baseBlockStorageDiskType>
<baseBlockStroageDiskDetailType>
<code>HDD</code>
<codeName>HDD</codeName>
</baseBlockStroageDiskDetailType>
<userData></userData>
<accessControlGroupList>
<accessControlGroupConfigurationNo>1038</accessControlGroupConfigurationNo>
<accessControlGroupName>ncloud-default-acg</accessControlGroupName>
<accessControlGroupDescription>Default AccessControlGroup</accessControlGroupDescription>
<isDefault>true</isDefault>
<createDate>2013-12-03T10:37:39+0900</createDate>
</accessControlGroupList>
</serverInstance>
</portForwardingRule>
</portForwardingRuleList>
</addPortForwardingRulesResponse>
Was this article helpful?