create_filter_rule
Create a firewall filter rule in a specified chain to control traffic on MikroTik RouterOS. Define match conditions and action to enforce network security policies.
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" in_interface_list/out_interface_list: name of an /interface list (e.g. "LAN", "WAN") rather than a single interface
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 | ||
| in_interface_list | No | ||
| out_interface_list | No | ||
| connection_nat_state | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |