disable_nat_rule
Disable an existing MikroTik firewall NAT rule by comment, optionally narrowed by chain, with a preview before applying.
Instructions
Disable an EXISTING firewall NAT rule (/ip/firewall/nat set disabled=yes), resolved by its comment - optionally narrowed by
chain (srcnat/dstnat).
Same "never creates a rule" guarantee and comment-based resolution
as enable_nat_rule.
WRITE tool, guarded: blocked entirely unless the server is running
with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the
default) to get a before/after preview without changing anything;
call again with confirm=True to actually apply it. Errors clearly if
no rule matches comment (narrowed by chain), or if more than one
still does (AmbiguousResourceError).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | ||
| comment | Yes | ||
| confirm | No | ||
| device_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||