Configuration -- WAN Connection
GET /api/config.wan.connection
Get the config of the WAN settings.
Available in 8.1.1 or later
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | array | optional | List of WAN IDs. Returns all if absent. |
infoType | string | optional | Filter: multipleIp, connection, physical, healthcheck, bandwidthAllowanceMonitor, cellular. Multiple values accepted. Returns all if empty. |
Response
| Field | Type | Description |
|---|---|---|
order | array | Order of WAN IDs |
<conn_id> | object | WAN config information |
WAN_Config Object:
| Field | Type | Description |
|---|---|---|
name | string | Connection name |
asLan | boolean | WAN performing WAN as LAN |
enable | boolean | WAN enabled |
active | boolean | WAN active |
multipleIp | array | Additional IP addresses (absent if asLan is true) |
connection | object | Connection settings (absent if asLan is true) |
physical | object | Physical interface settings (absent if asLan is true) |
healthcheck | object | Healthcheck settings (absent if asLan is true) |
bandwidthAllowanceMonitor | object | Bandwidth allowance monitor (absent if asLan is true) |
Connection Object
| Field | Type | Description |
|---|---|---|
method | string | DHCP, Static IP, PPPoE, L2TP, GRE, Drop In |
mode | string | NAT or IP Forwarding |
icmpPing | boolean | Reply ICMP Ping |
priority | integer | WAN priority (MAX) or connection type (Balance) |
dns | object | DNS settings |
ddns | object | Dynamic DNS settings |
bandwidth | object | Bandwidth limit |
schedule | integer | Schedule ID (only when WAN is scheduled) |
pepvpnNat | boolean | Apply NAT on SpeedFusion VPN peers' outgoing traffic |
gobi | object | Gobi info (only if WAN is Gobi) |
modem | object | Modem info (only if WAN is Modem) |
hotStandby | object | Hot standby settings |
idleTimeout | integer | Modem idle timeout in seconds |
dhcp | object | DHCP settings (for method=DHCP) |
staticIp | object | Static IP settings (for method=Static IP) |
pppoe | object | PPPoE settings (for method=PPPoE) |
l2tp | object | L2TP settings (for method=L2TP) |
gre | object | GRE settings (for method=GRE) |
dropIn | object | Drop-in settings (for method=Drop In) |
Physical Object
| Field | Type | Description |
|---|---|---|
type | string | ethernet, wireless, modem, gobi |
speed | string | Port speed (e.g. Auto, 1000baseTx-FD, 100baseTx-FD, etc.) |
advertise | boolean | Advertise speed enabled (only when speed is not Auto) |
supportGigaEthernet | boolean | Supports Gigabit Ethernet |
mtu | number | MTU value (576--1500). Absent if auto. |
mss | number | MSS value (536--1460). Absent if auto. |
mac | string (MAC) | MAC address. Absent if auto. |
vlan | integer | VLAN ID (only if enabled) |
Healthcheck Object
| Field | Type | Description |
|---|---|---|
enable | boolean | Healthcheck enabled. All other fields absent if false. |
method | string | http, nslookup, ping, smartcheck |
timeout | number | Timeout in seconds (1, 2, 3, 4, 5, or 10) |
interval | number | Interval in seconds (5, 10, 20, 30, 60, 120, 1800, or 3600) |
retry | number | Retry count (1, 3, 5, 10, 15, or 20) |
recovery | number | Recovery retry count (1, 3, 5, 10, 15, or 20) |
Bandwidth Allowance Monitor Object
| Field | Type | Description |
|---|---|---|
enable | boolean | Enabled. All other fields absent if false. |
action | array | Actions on allowance reach: email (at 75%/95%), disconnect (at 100%) |
start | integer | Start day (0 = last day of month) |
monthlyAllowance | object | value (integer) and unit (MB) |
cURL Example
curl -b cookies.txt \
"http://192.168.1.1/api/config.wan.connection?id=1&id=2&infoType=connection&infoType=healthcheck"
{
"stat": "ok",
"response": {
"1": {
"name": "WAN 1",
"asLan": false,
"enable": true,
"active": true,
"multipleIp": [],
"connection": {
"method": "dhcp",
"mode": "NAT",
"icmpPing": true,
"priority": 1,
"dns": { "auto": true },
"ddns": {
"username": "username",
"password": "@~HiDdEn~@",
"host": ["kjkjkjkj.com"],
"provider": "noip",
"enable": true
},
"bandwidth": {
"upload": { "value": 100000, "unit": "kbps" },
"download": { "value": 100000, "unit": "kbps" }
},
"schedule": 4,
"dhcp": { "hostname": "" }
},
"healthcheck": {
"method": "nslookup",
"timeout": 5,
"interval": 5,
"retry": 3,
"recovery": 3,
"enable": true,
"nslookup": {
"includePublic": false,
"host": ["208.67.222.222", "208.67.220.220"]
}
}
},
"order": [1, 2]
}
}
POST /api/config.wan.connection
⚠️ Beta API
Update the WAN connection settings. Most options update only when the information is provided.
Available in 8.1.1 or later
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
action | string | ✅ | update |
list | array | ✅ | List of WAN config objects to update |
WAN Config Update Object:
| Field | Type | Required | Description |
|---|---|---|---|
id | number | optional | WAN connection ID |
name | string | optional | Connection name |
enable | boolean | optional | Enable the WAN connection |
schedule | number or null | optional | Schedule ID. null to disable. |
connection | object | optional | Connection settings |
modem | object | optional | Modem settings (modem WAN only) |
cellular | object | optional | Cellular settings (cellular WAN only) |
wifi | object | optional | Wi-Fi WAN settings (Wi-Fi WAN only) |
physical | object | optional | Physical settings |
healthcheck | object | optional | Healthcheck settings |
bandwidthAllowanceMonitor | object | optional | Bandwidth allowance monitor |
multipleIp | array | optional | Additional IP addresses |
ddns | object | optional | Dynamic DNS settings |
Connection Settings
| Field | Type | Required | Description |
|---|---|---|---|
routingMode | string | optional | IP Forwarding or NAT |
pepvpnNat | boolean | optional | SpeedFusion VPN NAT |
useLanIp | boolean | optional | SNAT to default trunk LAN IP |
method | object | optional | Connection method details |
dns | object | optional | DNS config: auto (boolean), host (array of IPs) |
priority | integer | optional | WAN priority |
icmpPing | boolean | optional | ICMP Ping |
bandwidth | object | optional | Upload/download limits |
hotStandby | object | optional | enable (boolean), schedule (integer or null) |
idleTimeout | number or null | optional | Idle timeout. null to disable. |
Connection Method Object
| Field | Type | Required | Description |
|---|---|---|---|
type | string | optional | staticIp, dhcp, pppoe, l2tp, gre, openvpn |
detail | object | optional | Method-specific settings |
DHCP Detail:
| Field | Type | Description |
|---|---|---|
hostname | string | Hostname |
ipPassthrough | boolean | IP passthrough |
staticRoute | array | Static routes (for IP passthrough) |
Static IP Detail:
| Field | Type | Required | Description |
|---|---|---|---|
ip | string (IPv4) | ✅ | IP address |
mask | number (0--32) | ✅ | Subnet mask |
gateway | string (IPv4) | ✅ | Gateway |
ipPassthrough | boolean | optional | IP passthrough |
PPPoE Detail:
| Field | Type | Required | Description |
|---|---|---|---|
username | string | ✅ | Username |
password | string | ✅ | Password |
service | string or null | optional | Service name |
ip | string (IPv4) | optional | IP address |
managementNetwork | object or null | optional | Management IP: ip, mask |
L2TP Detail:
| Field | Type | Required | Description |
|---|---|---|---|
username | string | ✅ | Username |
password | string | ✅ | Password |
host | string (IPv4) | ✅ | Server IP address |
staticIp | object or null | optional | Static IP: ip, mask, gateway |
GRE Detail:
| Field | Type | Required | Description |
|---|---|---|---|
host | string (IPv4) | ✅ | Remote GRE host |
local | string (IPv4) | ✅ | Local IP address |
remote | string (IPv4) | ✅ | Remote IP address |
nat | string (IPv4) | optional | NAT IP address |
Cellular Settings
| Field | Type | Required | Description |
|---|---|---|---|
useExternalAntenna | boolean | optional | Use external antenna |
simCardScheme | string | optional | "" (default), 1 (SIM A), 2 (SIM B), alternate, remote_sim |
preferredSim | number | optional | 1 or 2 |
idleTimeout | number or null | optional | Idle timeout |
failbackTimeout | number or null | optional | Failback timeout |
sim | array | optional | SIM-specific settings |
signalThreshold | object | optional | Signal threshold settings |
Physical Settings
| Field | Type | Required | Description |
|---|---|---|---|
speed | string | optional | Auto, 1000baseTx-FD, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD |
advertise | boolean | optional | Advertise speed |
mtu | number or null | optional | MTU value (576--1500, or up to 9000 for jumbo frame). null to clear. |
mss | number or null | optional | MSS value (536--1452, max = MTU -- 40). null to clear. |
mac | string (MAC) or null | optional | MAC address (ethernet only). null to clear. |
vlan | number or null | optional | VLAN ID (1--4094 ethernet, 1--10 VDSL). null to clear. |
Healthcheck Settings
| Field | Type | Required | Description |
|---|---|---|---|
enable | boolean | ✅ | Enable healthcheck |
method | object | optional | Method type and detail |
timeout | number | optional | Timeout in ms (200--10000, 200--800 ping only) |
interval | number | optional | Interval in seconds (5--3600) |
retry | number | optional | Retries (1--20) |
recovery | number | optional | Recovery retries (1--20) |
Bandwidth Allowance Monitor Settings
| Field | Type | Required | Description |
|---|---|---|---|
enable | boolean | optional | Enable monitor |
action | array | optional | email, disconnect, restrict |
start | number | optional | Start day (0--28) |
monthlyAllowance | object | optional | value (integer) and unit (MB, GB, TB) |
DDNS Settings
| Field | Type | Required | Description |
|---|---|---|---|
enable | boolean | optional | Enable DDNS |
provider | string | optional | changeip, dyndns, noip, tzo, dnsomatic, others |
customUrl | string | optional | Custom URL (for provider=others) |
useWanIp | boolean | ✅ | Use WAN IP |
username | string | ✅ | Username |
password | string | ✅ | Password |
host | array | ✅ | Host domains |
cURL Example
curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"action":"update","list":[{"id":1,"enable":true}]}' \
http://192.168.1.1/api/config.wan.connection
POST /api/config.wan.connection.priority
Change the priority of the WAN connection. Returns WAN connection ID, priority, and enable information.
Available in 7.1.1 or later
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
instantActive | boolean | optional | Take effect immediately (otherwise pending apply changes) |
list | array | optional | List of priority update objects |
Priority Update Object:
| Field | Type | Required | Description |
|---|---|---|---|
connId | number | ✅ | WAN connection ID |
priority | integer | optional | Priority value |
group | number | optional | 0 = normal priority, 1 = independent from backup WAN (fw 9.0.0+) |
enable | boolean | optional | Enable the WAN connection |
Response
| Field | Type | Description |
|---|---|---|
order | array | Order of WAN IDs |
<conn_id> | object | WAN priority information: name, priority, group, enable |
cURL Example
curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"instantActive":true,"list":[{"connId":1,"priority":1},{"connId":2,"priority":2}]}' \
http://192.168.1.1/api/config.wan.connection.priority
{
"stat": "ok",
"response": {
"1": {
"name": "WAN 1",
"priority": 1,
"group": 0,
"enable": true
},
"2": {
"name": "WAN 2",
"priority": 2,
"group": 0,
"enable": true
},
"order": [1, 2]
}
}