port_forward_add
Create a port-forward rule mapping WAN ports or ranges to a LAN host, previewing UCI changes first and applying them only with confirm=true, with automatic rollback if the router stops responding.
Instructions
Forward a port (or range like 8000-8010) from the src zone (default wan) to a LAN host. proto: tcp, udp or "tcp udp". dest_port defaults to src_dport. Without confirm=true this only returns a preview of the UCI changes and changes nothing. With confirm=true it applies them with the router's rollback timer, checks the router still answers, and confirms; if the check fails, the router restores the old config by itself.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"src_dport": "<src_dport>",
"dest_ip": "<dest_ip>"
},
"name": "port_forward_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| src | No | wan | |
| dest | No | lan | |
| name | Yes | ||
| proto | No | tcp udp | |
| confirm | No | ||
| dest_ip | Yes | ||
| enabled | No | ||
| dest_port | No | ||
| src_dport | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||