create_filter_rule
Add a firewall filter rule to a MikroTik device's input, forward, or output chain. Define action and match conditions to control traffic.
Instructions
Creates a firewall filter rule in the specified chain on the MikroTik device.
Notes: connection_state: comma-separated e.g. "established,related,new,invalid" limit: RouterOS rate/burst string e.g. "10,5:packet" or "10/1s:packet" tcp_flags: RouterOS flag expression e.g. "syn,!ack" 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 | ||
| limit | No | ||
| action | Yes | ||
| device | No | ||
| comment | No | ||
| disabled | No | ||
| dst_port | No | ||
| protocol | No | ||
| src_port | No | ||
| tcp_flags | No | ||
| log_prefix | No | ||
| dst_address | No | ||
| src_address | No | ||
| in_interface | No | ||
| place_before | No | ||
| out_interface | No | ||
| connection_state | No | ||
| dst_address_list | No | ||
| src_address_list | No | ||
| connection_nat_state | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |