diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 59d6c6db8b..db29b23c18 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -516,7 +516,7 @@ linux_ip_link_show.textfsm, .*, linux, ip l[[ink]] [[show]] linux_ip_vrf_show.textfsm, .*, linux, ip v[[rf]] [[show]] linux_arp_-a.textfsm, .*, linux, arp -a -mikrotik_routeros_ip_firewall_filter_print_all_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip(v6)? firewall filter print all without-paging +mikrotik_routeros_ip_firewall_filter_print_all_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip(v6)? firewall filter print( all)? without-paging mikrotik_routeros_ip_dhcp-server_lease_print_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip dhcp-server lease print without-paging mikrotik_routeros_ip_firewall_nat_print_all_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip(v6)? firewall nat print all without-paging mikrotik_routeros_interface_ethernet_monitor_name_once.textfsm, .*, mikrotik_routeros, [[/]]interface ethernet monitor (\S+) once diff --git a/ntc_templates/templates/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.textfsm b/ntc_templates/templates/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.textfsm index d5c0e0e839..490e56b537 100644 --- a/ntc_templates/templates/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.textfsm +++ b/ntc_templates/templates/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.textfsm @@ -17,15 +17,16 @@ Value ipsec_policy (\S+) Value dst_address ([\w!.:/\d]+) Value dst_address_list (\S+) Value dst_port (\S+) +Value src_mac_address (\S+) Value log (yes|no) -Value log_prefix (\S+[\S ]+) +Value log_prefix ((\S+[\S ]+)?) Start ^Flags:.*$$ -> FirewallTable FirewallTable ^\s?${index}\s+(${flags})?\s+;;;\s${comment} - ^\s+chain=${chain}\s(action=${action}\s)?(connection-state=${connection_state}\s)?(connection-nat-state=${connection_nat_state}\s)?\s*(protocol=${protocol}\s)?(src-address=${src_address}\s)?(dst-address=${dst_address}\s)?(src-address-list=${src_address_list}\s)?(dst-address-list=${dst_address_list}\s)?(in-interface-list=${in_interface_list}\s)?(out-interface-list=${out_interface_list}\s)?(src-port=${src_port}\s)?(dst-port=${dst_port}\s)?(in-interface=${in_interface}\s)?(out-interface=${out_interface}\s)?(ipsec-policy=${ipsec_policy}\s)?(log=${log}\s)?(log-prefix="${log_prefix}"\s)?$$ -> Record - ^\s?${index}\s+(${flags})?\s+chain=${chain}\s(action=${action}\s)?(connection-state=${connection_state}\s)?(connection-nat-state=${connection_nat_state}\s)?(protocol=${protocol}\s)?(src-address=${src_address}\s)?(dst-address=${dst_address}\s)?(src-address-list=${src_address_list}\s)?(dst-address-list=${dst_address_list}\s)?(in-interface-list=${in_interface_list}\s)?(out-interface-list=${out_interface_list}\s)?(src-port=${src_port}\s)?(dst-port=${dst_port}\s)?(in-interface=${in_interface}\s)?(out-interface=${out_interface}\s)?(ipsec-policy=${ipsec_policy}\s)?(log=${log}\s)?(log-prefix="${log_prefix}"\s)?$$ -> Record + ^\s+chain=${chain}(\saction=${action})?(\sconnection-state=${connection_state})?(\sconnection-nat-state=${connection_nat_state})?\s*(\sprotocol=${protocol})?(\ssrc-address=${src_address})?(\sdst-address=${dst_address})?(\ssrc-address-list=${src_address_list})?(\sdst-address-list=${dst_address_list})?(\sin-interface-list=${in_interface_list})?(\sout-interface-list=${out_interface_list})?(\ssrc-port=${src_port})?(\sdst-port=${dst_port})?(\ssrc-mac-address=${src_mac_address})?(\sin-interface=${in_interface})?(\sout-interface=${out_interface})?(\sipsec-policy=${ipsec_policy})?(\slog=${log})?(\slog-prefix="${log_prefix}")?\s*$$ -> Record + ^\s?${index}\s+(${flags})?\s+chain=${chain}(\saction=${action})?(\sconnection-state=${connection_state})?(\sconnection-nat-state=${connection_nat_state})?(\sprotocol=${protocol})?(\ssrc-address=${src_address})?(\sdst-address=${dst_address})?(\ssrc-address-list=${src_address_list})?(\sdst-address-list=${dst_address_list})?(\sin-interface-list=${in_interface_list})?(\sout-interface-list=${out_interface_list})?(\ssrc-port=${src_port})?(\sdst-port=${dst_port})?(\ssrc-mac-address=${src_mac_address})?(\sin-interface=${in_interface})?(\sout-interface=${out_interface})?(\sipsec-policy=${ipsec_policy})?(\slog=${log})?(\slog-prefix="${log_prefix}")?\s*$$ -> Record ^\s*(?:\d{2}:){2}\d{2}\s+echo:\s*.*$$ -> Next ^. -> Error diff --git a/tests/mikrotik_routeros/ip_firewall_filter_print_all_without-paging/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.raw b/tests/mikrotik_routeros/ip_firewall_filter_print_all_without-paging/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.raw index 922abfcb8d..cbafb728e1 100644 --- a/tests/mikrotik_routeros/ip_firewall_filter_print_all_without-paging/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.raw +++ b/tests/mikrotik_routeros/ip_firewall_filter_print_all_without-paging/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.raw @@ -55,7 +55,7 @@ Flags: X - disabled, I - invalid, D - dynamic 18 ;;; related established chain=input connection-state=established,related -19 chain=forward connection-state=established,related +19 chain=forward connection-state=established,related src-mac-address=67:33:EB:0E:EB:A8 20 ;;; drop invalid connections 17:20:06 echo: system,error,critical login failure for user admin from 65.160.140.13 via ssh @@ -64,4 +64,4 @@ Flags: X - disabled, I - invalid, D - dynamic 21 ;;; Block all entrant chain=input action=drop in-interface=all-ppp -22 chain=input action=drop in-interface=all-ethernet +22 chain=input action=drop in-interface=all-ethernet log-prefix="" diff --git a/tests/mikrotik_routeros/ip_firewall_filter_print_all_without-paging/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.yml b/tests/mikrotik_routeros/ip_firewall_filter_print_all_without-paging/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.yml index a15ec02c12..25404c538c 100644 --- a/tests/mikrotik_routeros/ip_firewall_filter_print_all_without-paging/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.yml +++ b/tests/mikrotik_routeros/ip_firewall_filter_print_all_without-paging/mikrotik_routeros_ip_firewall_filter_print_all_without-paging.yml @@ -19,6 +19,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "1" @@ -40,6 +41,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "2" @@ -61,6 +63,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "3" @@ -82,6 +85,7 @@ parsed_sample: dst_address: "185.163.212.156/30" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "4" @@ -103,6 +107,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "5" @@ -124,6 +129,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "500,1701,4500" + src_mac_address: "" log: "" log_prefix: "Acces VPN" - index: "6" @@ -145,6 +151,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "7" @@ -166,6 +173,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "4430,22,8291" + src_mac_address: "" log: "" log_prefix: "" - index: "8" @@ -187,6 +195,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "161" + src_mac_address: "" log: "" log_prefix: "" - index: "9" @@ -208,6 +217,7 @@ parsed_sample: dst_address: "127.0.0.1" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "10" @@ -229,6 +239,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "11" @@ -250,6 +261,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "12" @@ -271,6 +283,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "13" @@ -292,6 +305,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "14" @@ -313,6 +327,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "15" @@ -334,6 +349,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "16" @@ -355,6 +371,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "17" @@ -376,6 +393,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "18" @@ -397,6 +415,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "19" @@ -418,6 +437,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "67:33:EB:0E:EB:A8" log: "" log_prefix: "" - index: "20" @@ -439,6 +459,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "21" @@ -460,6 +481,7 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: "" - index: "22" @@ -481,5 +503,6 @@ parsed_sample: dst_address: "" dst_address_list: "" dst_port: "" + src_mac_address: "" log: "" log_prefix: ""