NAT
10 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getAlg | GET | Get ALG Info |
| modifyAlg | PUT | Modify ALG setting |
| getGridOtoNats | GET | Get One-to-One NAT list |
| createOtoNat | POST | Create new One-to-One NAT |
| deleteOtoNat | DELETE | Delete One-to-One NAT |
| modifyOtoNat | PUT | Modify One-to-One NAT |
| getPortForwardingList | GET | Get port forwarding list |
| createPortForwarding | POST | Create new port forwarding |
| deletePortForwarding | DELETE | Delete port forwarding |
| modifyPortForwarding | PUT | Modify port forwarding |
getAlg
GET /openapi/v1/{omadacId}/sites/{siteId}/nat/alg
Get ALG Info
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
// omada_call_operation
{
"operationId": "getAlg",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get ALG Info.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only
modifyAlg
PUT /openapi/v1/{omadacId}/sites/{siteId}/nat/alg
Modify ALG setting
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema ALGSetting
| Field | Type | Required | Description |
|---|---|---|---|
ftp | boolean | yes | Whether to enable the FTP ALG |
h323 | boolean | yes | Whether to enable the H323 ALG |
pptp | boolean | yes | Whether to enable the PPTP ALG |
sip | boolean | yes | Whether to enable the SIP ALG |
ipSec | boolean | yes | Whether to enable the IPSec ALG |
ftpPorts | array<integer> | no | The listening port for FTP signaling messages, the default port is 21 |
sipTcp | boolean | no | Enable this option if your SIP signaling uses the TCP protocol and the device needs to modify the IP address and port in SIP messages, enabled by default. |
sipUdp | boolean | no | Enable this option if your SIP signaling uses the UDP protocol and the device needs to modify the IP address and port in SIP signaling messages, enabled by default. |
sipPorts | array<integer> | no | The listening ports for SIP signaling messages, the default ports are 5060 and 5061 |
sipDirectSignaling | boolean | no | Enable this option if you want SIP signaling connections to only arrive from registered IP addresses, enabled by default. |
sipDirectMedia | boolean | no | Enable this option if you want SIP media connections to only arrive from registered IP addresses. |
sipTimeout | boolean | no | Enable this option if you want to apply timeout limits to SIP signaling and media connections on the device. |
sipSignalingTimeout | integer | no | Modify this item if you want to adjust the timeout duration for SIP signaling sessions (1 – 86,400 seconds). |
sipMediaTimeout | integer | no | Modify this item if you want to adjust the timeout duration for SIP media sessions (1 – 86,400 seconds). |
// omada_call_operation
{
"operationId": "modifyAlg",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify ALG setting.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
getGridOtoNats
GET /openapi/v1/{omadacId}/sites/{siteId}/nat/one-to-one-nat
Get One-to-One NAT list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
page | query | integer | no | Start page number. Start from 1. (default 1) |
pageSize | query | integer | no | Number of entries per page. It should be within the range of 1–1000. (default 100) |
// omada_call_operation
{
"operationId": "getGridOtoNats",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get One-to-One NAT list.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only
createOtoNat
POST /openapi/v1/{omadacId}/sites/{siteId}/nat/one-to-one-nat
Create new One-to-One NAT
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema OtoNatOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, name should contain 1 to 64 characters. |
status | boolean | yes | Status |
interfaceIds | array<string> | yes | This field represents WAN port ID. WAN port ID can be obtained from can be obtained from 'Get internet basic info' interface. |
internalIp | string | yes | Internal IP |
externalIp | string | yes | External IP |
dmz | boolean | yes | Whether to enable the h323 dmz |
description | string | no | Description should contain 1 to 64 characters. |
// omada_call_operation
{
"operationId": "createOtoNat",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Create new One-to-One NAT.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
deleteOtoNat
DELETE /openapi/v1/{omadacId}/sites/{siteId}/nat/one-to-one-nat/{otonatId}
Delete One-to-One NAT
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
otonatId | path | string | yes | Otonat ID |
// omada_call_operation
{
"operationId": "deleteOtoNat",
"params": {
"siteId": "<siteId>",
"otonatId": "<otonatId>"
}
}Details, permissions and error codes
Delete One-to-One NAT.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
modifyOtoNat
PUT /openapi/v1/{omadacId}/sites/{siteId}/nat/one-to-one-nat/{otonatId}
Modify One-to-One NAT
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
otonatId | path | string | yes | Otonat ID |
Request body — application/json (required) — schema OtoNatOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, name should contain 1 to 64 characters. |
status | boolean | yes | Status |
interfaceIds | array<string> | yes | This field represents WAN port ID. WAN port ID can be obtained from can be obtained from 'Get internet basic info' interface. |
internalIp | string | yes | Internal IP |
externalIp | string | yes | External IP |
dmz | boolean | yes | Whether to enable the h323 dmz |
description | string | no | Description should contain 1 to 64 characters. |
// omada_call_operation
{
"operationId": "modifyOtoNat",
"params": {
"siteId": "<siteId>",
"otonatId": "<otonatId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify One-to-One NAT.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
getPortForwardingList
GET /openapi/v1/{omadacId}/sites/{siteId}/nat/port-forwardings
Get port forwarding list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
page | query | integer | no | Start page number. Start from 1. (default 1) |
pageSize | query | integer | no | Number of entries per page. It should be within the range of 1–1000. (default 100) |
// omada_call_operation
{
"operationId": "getPortForwardingList",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get port forwarding list.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only
createPortForwarding
POST /openapi/v1/{omadacId}/sites/{siteId}/nat/port-forwardings
Create new port forwarding
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema PortForwardingConfig
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, name should contain 1 to 64 characters. |
status | boolean | yes | Port-forwarding enable status. |
from | integer | yes | From corresponds with source IP in web. From should be a value as follows: 0: where; 1: limited address |
limitedAddresses | array<string> | no | Only for limited address |
interfaceWanPortId | array<string> | no | This field represents WAN port ID. WAN port ID can be obtained from can be obtained from 'Get internet basic info' interface. |
virtualWanId | array<string> | no | This field represents Virtual Wan ID. Virtual Wan Id can be obtained from 'Query available virtual WAN list' |
existVirtualWan | boolean | no | Whether Virtual Wan has been configured in current Port Forwarding. |
wanIps | array<PortIpOpenApiVO> | no | WAN IPs. Wan IPs can be obtained from 'Get internet ports config' interface |
existWanIp | boolean | no | Whether WAN IP has been configured in current Port Forwarding. |
externalPort | string | no | External port corresponds with source port in web. External port should be within the range of 1–65535. Must be filled in when DMS is false. |
forwardIp | string | yes | Forward IP corresponds with destination IP in web. Forward IP |
forwardPort | string | no | Forward port corresponds with destination port in web. Forward port should be 1 or 1-10, within the range of 1–65535. Must be filled in when DMS is false. |
protocol | integer | no | Protocol should be a value as follows: 0: ALL; 1: TCP; 2: UDP. Must be filled in when DMS is false. |
dMZ | boolean | yes | With DMZ enabled, all ports are open and the traffic from external network will be forwarded to the specific destination IP in the LAN. |
// omada_call_operation
{
"operationId": "createPortForwarding",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Create new port forwarding.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33474 - This feature is not supported for the DS-Lite or Map-E WAN connection types.
-34201 - Only one DMZ rule is allowed for one WAN port.
-34209 - Cannot create a port forwarding rule with the same Interface, Source Port, and WAN IP as an existing one. Please modify.
-34245 - The limited IP address range conflict.
-34259 - The Gateway does not support WAN IP in Portforwarding
-34260 - The Gateway does not support select Virtual WAN in Portforwarding
-34261 - The source port already exists for the chosen interface(s). Please change the source port.
deletePortForwarding
DELETE /openapi/v1/{omadacId}/sites/{siteId}/nat/port-forwardings/{portForwardingId}
Delete port forwarding
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
portForwardingId | path | string | yes | Port Forwarding ID |
// omada_call_operation
{
"operationId": "deletePortForwarding",
"params": {
"siteId": "<siteId>",
"portForwardingId": "<portForwardingId>"
}
}Details, permissions and error codes
Delete port forwarding.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
modifyPortForwarding
PUT /openapi/v1/{omadacId}/sites/{siteId}/nat/port-forwardings/{portForwardingId}
Modify port forwarding
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
portForwardingId | path | string | yes | Port Forwarding ID |
Request body — application/json (required) — schema PortForwardingConfig
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, name should contain 1 to 64 characters. |
status | boolean | yes | Port-forwarding enable status. |
from | integer | yes | From corresponds with source IP in web. From should be a value as follows: 0: where; 1: limited address |
limitedAddresses | array<string> | no | Only for limited address |
interfaceWanPortId | array<string> | no | This field represents WAN port ID. WAN port ID can be obtained from can be obtained from 'Get internet basic info' interface. |
virtualWanId | array<string> | no | This field represents Virtual Wan ID. Virtual Wan Id can be obtained from 'Query available virtual WAN list' |
existVirtualWan | boolean | no | Whether Virtual Wan has been configured in current Port Forwarding. |
wanIps | array<PortIpOpenApiVO> | no | WAN IPs. Wan IPs can be obtained from 'Get internet ports config' interface |
existWanIp | boolean | no | Whether WAN IP has been configured in current Port Forwarding. |
externalPort | string | no | External port corresponds with source port in web. External port should be within the range of 1–65535. Must be filled in when DMS is false. |
forwardIp | string | yes | Forward IP corresponds with destination IP in web. Forward IP |
forwardPort | string | no | Forward port corresponds with destination port in web. Forward port should be 1 or 1-10, within the range of 1–65535. Must be filled in when DMS is false. |
protocol | integer | no | Protocol should be a value as follows: 0: ALL; 1: TCP; 2: UDP. Must be filled in when DMS is false. |
dMZ | boolean | yes | With DMZ enabled, all ports are open and the traffic from external network will be forwarded to the specific destination IP in the LAN. |
// omada_call_operation
{
"operationId": "modifyPortForwarding",
"params": {
"siteId": "<siteId>",
"portForwardingId": "<portForwardingId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify port forwarding.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33474 - This feature is not supported for the DS-Lite or Map-E WAN connection types.
-34201 - Only one DMZ rule is allowed for one WAN port.
-34209 - Cannot create a port forwarding rule with the same Interface, Source Port, and WAN IP as an existing one. Please modify.
-34245 - The limited IP address range conflict.
-34259 - The Gateway does not support WAN IP in Portforwarding
-34260 - The Gateway does not support select Virtual WAN in Portforwarding
-34261 - The source port already exists for the chosen interface(s). Please change the source port.