update_nat_rule
Update an existing NAT rule on MikroTik RouterOS by specifying its ID and modifying parameters like addresses, ports, protocol, and interfaces. Modify firewall NAT configuration without recreating rules.
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 |