REFERENCE

v6.11.0

IPv6 Firewall — Filter

IPv6 filter rules (`/ipv6 firewall filter`).

Tools

create_ipv6_filter_rule

Create IPv6 Firewall Filter Rule · Risk: write

Creates an IPv6 firewall FILTER rule (/ipv6 firewall filter) — the accept/drop/reject decision table for IPv6 traffic TO the router (chain=input), THROUGH it (forward), or FROM it (output). For IPv4 filter rules use create_filter_rule; for IPv6 NAT use create_ipv6_nat_rule; for IPv6 packet marking use create_ipv6_mangle_rule; for IPv6 pre-conntrack drops use create_ipv6_raw_rule. Returns the created rule's full detail including its .id. connection_state: comma-separated e.g. "established,related,new,invalid". hop_limit: RouterOS hop-limit expression e.g. "equal:1" or "less:64". limit: RouterOS rate/burst string e.g. "10,5: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".

ParameterRequiredDefinition
chainYes{"type":"string","enum":["input","forward","output"]}
actionYes{"type":"string","enum":["accept","drop","reject","jump","log","passthrough","return","tarpit","fasttrack-connection","add-src-to-address-list","add-dst-to-address-list"]}
src_addressNo{"type":"string"}
dst_addressNo{"type":"string"}
src_portNo{"type":"string"}
dst_portNo{"type":"string"}
protocolNo{"type":"string"}
in_interfaceNo{"type":"string"}
out_interfaceNo{"type":"string"}
in_interface_listNo{"type":"string"}
out_interface_listNo{"type":"string"}
connection_stateNoComma-separated e.g. "established,related,new,invalid" {"type":"string"}
src_address_listNo{"type":"string"}
dst_address_listNo{"type":"string"}
hop_limitNoHop-limit expression e.g. "equal:1" or "less:64" {"type":"string"}
limitNoRouterOS rate/burst string e.g. "10,5:packet" {"type":"string"}
tcp_flagsNoRouterOS flag expression e.g. "syn,!ack" {"type":"string"}
portNoMatch src or dst port (any protocol with ports) {"type":"string"}
icmp_optionsNoICMPv6 type:code e.g. "128:0" {"type":"string"}
connection_markNoMatch packets with this connection mark {"type":"string"}
connection_typeNoMatch connection helper type e.g. "ftp", "sip" {"type":"string"}
connection_bytesNoMatch total connection bytes range e.g. "1000000-" {"type":"string"}
connection_limitNoLimit connections per address e.g. "100,128" {"type":"string"}
connection_rateNoMatch connection data rate e.g. "100k-" {"type":"string"}
packet_markNoMatch packets with this packet mark {"type":"string"}
routing_markNoMatch packets with this routing mark {"type":"string"}
packet_sizeNoMatch packet size range e.g. "1400-1500" {"type":"string"}
dscpNoMatch DSCP (0-63) {"type":"string"}
ingress_priorityNoMatch ingress priority (0-63) {"type":"string"}
priorityNoMatch priority set by mangle (0-63) {"type":"string"}
src_mac_addressNoMatch source MAC address {"type":"string"}
src_address_typeNoMatch src address type e.g. "unicast", "multicast" {"type":"string"}
dst_address_typeNoMatch dst address type e.g. "unicast", "multicast" {"type":"string"}
tcp_mssNoMatch TCP MSS value/range e.g. "1300-1536" {"type":"string"}
headersNoMatch IPv6 extension headers present in the packet {"type":"string"}
tls_hostNoMatch TLS SNI host (glob pattern) {"type":"string"}
contentNoMatch packets containing this text {"type":"string"}
nthNoMatch every Nth packet e.g. "2,0" {"type":"string"}
randomNoRandomly match a percentage of packets (1-99) {"type":"string"}
timeNoMatch by time/day e.g. "8h-16h,mon,tue" {"type":"string"}
dst_limitNoPer-destination rate limit e.g. "10,5,dst-address" {"type":"string"}
ipsec_policyNoMatch IPsec policy e.g. "in,ipsec" or "out,none" {"type":"string"}
per_connection_classifierNoHash connections into buckets e.g. "both-addresses:2/0" {"type":"string"}
jump_targetNoTarget chain name when action=jump {"type":"string"}
reject_withNoICMPv6 reject response when action=reject e.g. "icmp-admin-prohibited" {"type":"string"}
address_listNoAddress-list name when action=add-src/dst-to-address-list {"type":"string"}
address_list_timeoutNoTimeout for the added address-list entry e.g. "1d" or "none" {"type":"string"}
commentNo{"type":"string"}
disabledYes{"default":false,"type":"boolean"}
logYes{"default":false,"type":"boolean"}
log_prefixNo{"type":"string"}
place_beforeNoRule number or ID (*N) to insert before e.g. "0" or "*3" {"type":"string"}

list_ipv6_filter_rules

List IPv6 Firewall Filter Rules · Risk: read

Lists all IPv6 firewall FILTER rules (/ipv6 firewall filter) with optional filtering by chain, action, address, protocol, interface, or state flags. Returns the ordered rule list including .id values needed by get_ipv6_filter_rule, update_ipv6_filter_rule, move_ipv6_filter_rule, enable_ipv6_filter_rule, disable_ipv6_filter_rule, and remove_ipv6_filter_rule. For IPv4 filter rules use list_filter_rules; for IPv6 NAT use list_ipv6_nat_rules; for IPv6 mangle use list_ipv6_mangle_rules; for IPv6 raw use list_ipv6_raw_rules.

ParameterRequiredDefinition
chain_filterNo{"type":"string"}
action_filterNo{"type":"string"}
src_address_filterNo{"type":"string"}
dst_address_filterNo{"type":"string"}
protocol_filterNo{"type":"string"}
interface_filterNo{"type":"string"}
disabled_onlyYes{"default":false,"type":"boolean"}
invalid_onlyYes{"default":false,"type":"boolean"}
dynamic_onlyYes{"default":false,"type":"boolean"}

get_ipv6_filter_rule

Get IPv6 Firewall Filter Rule · Risk: read

Fetches full detail of a single IPv6 firewall FILTER rule (/ipv6 firewall filter print detail where .id=…). Use when you need all fields of one specific rule rather than the full list. For the complete ordered list use list_ipv6_filter_rules; for the IPv4 equivalent use get_filter_rule. rule_id takes the .id from list_ipv6_filter_rules output e.g. "*1" or "0".

ParameterRequiredDefinition
rule_idYesRule ID from list output e.g. "*1" or "0" {"type":"string"}

update_ipv6_filter_rule

Update IPv6 Firewall Filter Rule · Risk: write-idempotent

Modifies one or more fields of an existing IPv6 firewall FILTER rule (/ipv6 firewall filter set) then returns the updated rule detail. Only supplied fields are changed; omit a field to leave it untouched. Pass "" (empty string) to clear an optional field (e.g. src_address=""). To toggle enabled/disabled state only, prefer enable_ipv6_filter_rule or disable_ipv6_filter_rule. For the IPv4 equivalent use update_filter_rule. rule_id takes the .id from list_ipv6_filter_rules e.g. "*1" or "0".

ParameterRequiredDefinition
rule_idYes{"type":"string"}
chainNo{"type":"string"}
actionNo{"type":"string"}
src_addressNo{"type":"string"}
dst_addressNo{"type":"string"}
src_portNo{"type":"string"}
dst_portNo{"type":"string"}
protocolNo{"type":"string"}
in_interfaceNo{"type":"string"}
out_interfaceNo{"type":"string"}
in_interface_listNo{"type":"string"}
out_interface_listNo{"type":"string"}
connection_stateNo{"type":"string"}
src_address_listNo{"type":"string"}
dst_address_listNo{"type":"string"}
hop_limitNo{"type":"string"}
limitNo{"type":"string"}
tcp_flagsNo{"type":"string"}
portNo{"type":"string"}
icmp_optionsNo{"type":"string"}
connection_markNo{"type":"string"}
connection_typeNo{"type":"string"}
connection_bytesNo{"type":"string"}
connection_limitNo{"type":"string"}
connection_rateNo{"type":"string"}
packet_markNo{"type":"string"}
routing_markNo{"type":"string"}
packet_sizeNo{"type":"string"}
dscpNo{"type":"string"}
ingress_priorityNo{"type":"string"}
priorityNo{"type":"string"}
src_mac_addressNo{"type":"string"}
src_address_typeNo{"type":"string"}
dst_address_typeNo{"type":"string"}
tcp_mssNo{"type":"string"}
headersNo{"type":"string"}
tls_hostNo{"type":"string"}
contentNo{"type":"string"}
nthNo{"type":"string"}
randomNo{"type":"string"}
timeNo{"type":"string"}
dst_limitNo{"type":"string"}
ipsec_policyNo{"type":"string"}
per_connection_classifierNo{"type":"string"}
jump_targetNo{"type":"string"}
reject_withNo{"type":"string"}
address_listNo{"type":"string"}
address_list_timeoutNo{"type":"string"}
commentNo{"type":"string"}
disabledNo{"type":"boolean"}
logNo{"type":"boolean"}
log_prefixNo{"type":"string"}

remove_ipv6_filter_rule

Remove IPv6 Firewall Filter Rule · Risk: destructive

Permanently deletes an IPv6 firewall FILTER rule (/ipv6 firewall filter remove) after verifying the rule exists via a count-only check. To temporarily suppress a rule without deleting it use disable_ipv6_filter_rule instead. For the IPv4 equivalent use remove_filter_rule. rule_id takes the .id from list_ipv6_filter_rules e.g. "*1" or "0".

ParameterRequiredDefinition
rule_idYes{"type":"string"}

move_ipv6_filter_rule

Move IPv6 Firewall Filter Rule · Risk: write-idempotent

Reorders an IPv6 firewall FILTER rule to a target position within its chain (/ipv6 firewall filter move). Evaluation order is top-to-bottom; use this to ensure a rule fires before or after others. For the IPv4 equivalent use move_filter_rule; for IPv6 NAT reordering use move_ipv6_nat_rule. rule_id takes the .id from list_ipv6_filter_rules; destination is the 0-based target position index.

ParameterRequiredDefinition
rule_idYes{"type":"string"}
destinationYes0-based target position index {"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}

enable_ipv6_filter_rule

Enable IPv6 Firewall Filter Rule · Risk: write-idempotent

Re-enables a previously disabled IPv6 firewall FILTER rule (/ipv6 firewall filter set disabled=no) without altering any other field. For the IPv4 equivalent use enable_filter_rule; to disable use disable_ipv6_filter_rule; to change other fields use update_ipv6_filter_rule. rule_id takes the .id from list_ipv6_filter_rules e.g. "*1" or "0".

ParameterRequiredDefinition
rule_idYes{"type":"string"}

disable_ipv6_filter_rule

Disable IPv6 Firewall Filter Rule · Risk: write-idempotent

Temporarily disables an IPv6 firewall FILTER rule (/ipv6 firewall filter set disabled=yes) without deleting it — the rule remains in the list but is skipped during packet evaluation. For the IPv4 equivalent use disable_filter_rule; to re-enable use enable_ipv6_filter_rule; to permanently remove use remove_ipv6_filter_rule. rule_id takes the .id from list_ipv6_filter_rules e.g. "*1" or "0".

ParameterRequiredDefinition
rule_idYes{"type":"string"}

On this page