create_nat_rule
Create NAT rules on MikroTik routers for srcnat or dstnat. Set chain, action, addresses, ports, and interfaces to manage traffic translation.
Instructions
Creates a NAT rule (srcnat or dstnat) on the MikroTik device.
Notes: 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" place_before: rule number or ID (*N) to insert before e.g. "0" or "*3"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log | No | ||
| chain | Yes | ||
| action | Yes | ||
| device | No | ||
| comment | No | ||
| 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 | ||
| place_before | No | ||
| to_addresses | No | ||
| out_interface | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |