NAT (Template)
11 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getTemplateAlg | GET | Get site template's ALG Info |
| modifyTemplateAlg | PUT | Modify site template's ALG setting |
| getTemplatePortForwardingList | GET | Get site template's port forwarding list |
| createTemplatePortForwarding | POST | Create site template's new port forwarding |
| deleteTemplatePortForwarding | DELETE | Delete site template's port forwarding |
| modifyTemplatePortForwarding | PUT | Modify site template's port forwarding |
| addOtoNatTemplates | POST | Create site template's otonat (deprecated) |
| getDisableNatGrid | GET | Get siteTemplate's Disable Nat list |
| addDisableNat | POST | Create new siteTemplate's Disable Nat |
| deleteDisableNat | DELETE | Delete an existing Disable Nat in siteTemplate |
| modifyDisableNatTemplate | PUT | Modify an existing Disable Nat in siteTemplate |
getTemplateAlg
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/nat/alg
Get site template's ALG Info
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
// omada_call_operation
{
"operationId": "getTemplateAlg",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get site template's ALG Info.
The interface requires one of the permissions:
Global Site Template Manager View Only
modifyTemplateAlg
PUT /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/nat/alg
Modify site template's ALG setting
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
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": "modifyTemplateAlg",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify site template's ALG setting.
The interface requires one of the permissions:
Global Site Template Manager Modify
getTemplatePortForwardingList
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/nat/port-forwardings
Get site template's port forwarding list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
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": "getTemplatePortForwardingList",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get site template's port forwarding list.
The interface requires one of the permissions:
Global Site Template Manager View Only
createTemplatePortForwarding
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/nat/port-forwardings
Create site template's new port forwarding
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
Request body — application/json (required) — schema PortForwardingTemplateOpenApiVO
| 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> | yes | This field represents WAN port ID. WAN port ID can be obtained from can be obtained from 'Get internet basic info' interface. |
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": "createTemplatePortForwarding",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Create site template's new port forwarding.
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-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.
deleteTemplatePortForwarding
DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/nat/port-forwardings/{portForwardingId}
Delete site template's port forwarding
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
portForwardingId | path | string | yes | Port forwarding ID |
// omada_call_operation
{
"operationId": "deleteTemplatePortForwarding",
"params": {
"siteTemplateId": "<siteTemplateId>",
"portForwardingId": "<portForwardingId>"
}
}Details, permissions and error codes
Delete site template's port forwarding.
The interface requires one of the permissions:
Global Site Template Manager Modify
modifyTemplatePortForwarding
PUT /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/nat/port-forwardings/{portForwardingId}
Modify site template's port forwarding
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
portForwardingId | path | string | yes | Port forwarding ID |
Request body — application/json (required) — schema PortForwardingTemplateOpenApiVO
| 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> | yes | This field represents WAN port ID. WAN port ID can be obtained from can be obtained from 'Get internet basic info' interface. |
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": "modifyTemplatePortForwarding",
"params": {
"siteTemplateId": "<siteTemplateId>",
"portForwardingId": "<portForwardingId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify site template's port forwarding.
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-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.
addOtoNatTemplates
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/transmission/otonats
Deprecated
This operation is deprecated.
Create site template's otonat
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template 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": "addOtoNatTemplates",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Create site template's otonat. This interface had been deprecated.
The interface requires one of the permissions:
Global Site Template Manager Modify
getDisableNatGrid
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/wired-networks/disable-nat
Get siteTemplate's Disable Nat list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
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": "getDisableNatGrid",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get siteTemplate's Disable Nat list.
The interface requires one of the permissions:
Global Site Template Manager View Only
addDisableNat
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/wired-networks/disable-nat
Create new siteTemplate's Disable Nat
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
Request body — application/json (required) — schema Disable Nat
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name of the Disable Nat. |
status | boolean | yes | The Status of the Disable Nat. |
lanList | array<string> | yes | A list of Lan of the Disable Nat. |
description | string | no | The description of the Disable Nat. |
interface | string | yes | The wan of the Disable Nat. |
// omada_call_operation
{
"operationId": "addDisableNat",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Create new siteTemplate's Disable Nat.
The interface requires one of the permissions:
Global Site Template Manager Modify
deleteDisableNat
DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/wired-networks/disable-nat/{disableNatId}
Delete an existing Disable Nat in siteTemplate
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
disableNatId | path | string | yes | Disable Nat ID |
// omada_call_operation
{
"operationId": "deleteDisableNat",
"params": {
"siteTemplateId": "<siteTemplateId>",
"disableNatId": "<disableNatId>"
}
}Details, permissions and error codes
Delete an existing Disable Nat in siteTemplate.
The interface requires one of the permissions:
Global Site Template Manager Modify
modifyDisableNatTemplate
PUT /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/wired-networks/disable-nat/{disableNatId}
Modify an existing Disable Nat in siteTemplate
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
disableNatId | path | string | yes | Disable Nat ID |
Request body — application/json (required) — schema Disable Nat
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name of the Disable Nat. |
status | boolean | yes | The Status of the Disable Nat. |
lanList | array<string> | yes | A list of Lan of the Disable Nat. |
description | string | no | The description of the Disable Nat. |
interface | string | yes | The wan of the Disable Nat. |
// omada_call_operation
{
"operationId": "modifyDisableNatTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"disableNatId": "<disableNatId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify an existing Disable Nat in siteTemplate.
The interface requires one of the permissions:
Global Site Template Manager Modify