Skip to content

Commit

Permalink
Fix huawei display acl all - port numbers replaced by names
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard Lavaud authored and k-ribot committed Dec 5, 2022
1 parent e147c02 commit df7c04b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ntc_templates/templates/huawei_vrp_display_acl_all.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Value ACTION (deny|permit)
Value PROTOCOL (\d+|icmp(v6)?|tcp|udp|gre|igmp|ip(v6)?|ipinip|ospf)
Value SOURCE (((\d+.){3}\d+|[0-9a-fA-F]{1,4}([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4})[\/\s]((\d+.){3}\d+|\d+))
Value SOURCE_PORT_MODIFIER (eq|lt|gt|range)
Value SOURCE_PORT_RANGE ((\d+)(\s(\d+))?)
Value SOURCE_PORT_RANGE ((\S+)(\s(\S+))?)
Value DESTINATION (((\d+.){3}\d+|[0-9a-fA-F]{1,4}([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4})[\/\s]((\d+.){3}\d+|\d+))
Value DESTINATION_PORT_MODIFIER (eq|lt|gt|range)
Value DESTINATION_PORT_RANGE ((\d+)(\s(\d+))?)
Value DESTINATION_PORT_RANGE ((\S+)(\s(\S+))?)
Value MATCHES (\d+)

Start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ Acl's step is 5
Advanced ACL REGLE_NAT 3998, 3 rules
Acl's step is 5
rule 5 permit tcp source 85.14.167.234 0 destination 192.214.198.156 0 destination-port eq 8022 (18 matches)
rule 10 deny tcp destination 192.214.198.156 0 destination-port eq 8022 (8 matches)
rule 15 permit ip (278450 matches)
rule 10 deny tcp destination 192.214.198.156 0 destination-port eq www (8 matches)
rule 15 deny tcp destination 192.23.26.1 0.0.255.255 destination-port range 50 80 (8 matches)
rule 20 permit ip (278450 matches)

Advanced ACL qsdqsd 3999, 0 rule
Acl's step is 5
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,23 @@ parsed_sample:
source_port_range: ""
destination: "192.214.198.156 0"
destination_port_modifier: "eq"
destination_port_range: "8022"
destination_port_range: "www"
matches: "8"
- acl_name: "REGLE_NAT"
acl_number: "3998"
sn: "15"
action: "deny"
protocol: "tcp"
source: ""
source_port_modifier: ""
source_port_range: ""
destination: "192.23.26.1 0.0.255.255"
destination_port_modifier: "range"
destination_port_range: "50 80"
matches: "8"
- acl_name: "REGLE_NAT"
acl_number: "3998"
sn: "20"
action: "permit"
protocol: "ip"
source: ""
Expand Down

0 comments on commit df7c04b

Please sign in to comment.