update_nat_rule
Modify an existing NAT rule on a MikroTik device: change source/destination addresses, ports, interfaces, protocol, action, or disable it using the rule ID.
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.
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 |