update_nat_rule
Update an existing MikroTik NAT rule by rule ID, adjusting addresses, ports, interfaces, or other parameters to modify traffic forwarding behavior.
Instructions
Updates an existing NAT rule on the MikroTik device.
Notes: rule_id: use the ID from list output e.g. "*1" or "0" to_addresses: single IP or range e.g. "10.0.0.1" or "10.0.0.1-10.0.0.10" to_ports: single port or range e.g. "8080" or "8080-8090" Pass "" to clear an optional field.
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": {
"rule_id": "<rule_id>"
},
"name": "update_nat_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log | No | ||
| chain | No | ||
| action | No | ||
| device | No | ||
| comment | No | ||
| rule_id | Yes | ||
| disabled | No | ||
| dst_port | No | ||
| protocol | No | ||
| src_port | No | ||
| to_ports | No | ||
| log_prefix | No | ||
| dst_address | No | ||
| src_address | No | ||
| in_interface | No | ||
| to_addresses | No | ||
| out_interface | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |