-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix1037_paloalto_panos_show_running_nat-policy
- add 2 more raw examples
- Loading branch information
Pieter E Smit
committed
Dec 14, 2021
1 parent
d8c74b3
commit 45d3018
Showing
5 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
34 changes: 18 additions & 16 deletions
34
ntc_templates/templates/paloalto_panos_show_running_nat-policy.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
Value Filldown NAME (.*?) | ||
Value Required NAT_TYPE (\S+) | ||
Value FROM (\S+) | ||
Value SOURCE (\S+) | ||
Value TO (\S+) | ||
Value TO_INTERFACE ({\S+}?) | ||
Value DESTINATION (\S+) | ||
Value FROM (\S+|\[(\s\S+)+\s\]) | ||
# any | ip (optional mask) | [ multiIP ] | ||
Value SOURCE (any|([A-Fa-f0-9:\.]+(\/\d+)?)|\[(\s[A-Fa-f0-9:\.]+(\/\d+)?)+\s\]) | ||
Value TO (\S+|\[(\s\S+)+\s\]) | ||
Value TO_INTERFACE (\S*) | ||
Value DESTINATION (\S+|\[(\s\S+)+\s\]) | ||
Value SERVICE ([\S+\s+]+) | ||
Value TRANSLATE_TO ([\S+\s+]+) | ||
Value TERMINAL (\S+) | ||
|
||
Start | ||
^${NAME}\s+\{ | ||
^\s+nat-type\s+${NAT_TYPE}; | ||
^\s+from\s+${FROM}; | ||
^\s+source\s+${SOURCE}; | ||
^\s+to\s+${TO}; | ||
^s+to-interface\s+${TO_INTERFACE}; | ||
^\s+destination\s+${DESTINATION}; | ||
^\s+service\s+${SERVICE}; | ||
^\s+translate-to\s+"${TRANSLATE_TO}"; | ||
^\s+terminal\s+${TERMINAL}; | ||
^} -> Record | ||
^${NAME}\s+\{$$ | ||
^\s+nat-type\s+${NAT_TYPE};$$ | ||
^\s+from\s+${FROM};$$ | ||
^\s+source\s+${SOURCE};$$ | ||
^\s+to\s+${TO};$$ | ||
^.+to-interface\s${TO_INTERFACE}\s?;$$ | ||
^\s+destination\s+${DESTINATION};$$ | ||
^\s+service\s+${SERVICE};$$ | ||
^\s+translate-to\s+"${TRANSLATE_TO}";$$ | ||
^\s+terminal\s+${TERMINAL};$$ | ||
^}$$ -> Record | ||
^. -> Error |
11 changes: 11 additions & 0 deletions
11
tests/paloalto_panos/show_running_nat-policy/paloalto_panos_show_running_nat-policy1.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"DMZ-PROXY-NAT; index: 1" { | ||
nat-type ipv4; | ||
from DMZ-APPS; | ||
source [ 10.1.1.1 10.1.1.2 ]; | ||
to UNTRUSTED; | ||
to-interface ethernet1/5 ; | ||
destination any; | ||
service 0:any/any/any; | ||
translate-to "src: 2.2.2.2 (dynamic-ip-and-port) (pool idx: 1)"; | ||
terminal no; | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/paloalto_panos/show_running_nat-policy/paloalto_panos_show_running_nat-policy1.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
parsed_sample: | ||
- name: "\"DMZ-PROXY-NAT; index: 1\"" | ||
nat_type: "ipv4" | ||
from: "DMZ-APPS" | ||
source: "[ 10.1.1.1 10.1.1.2 ]" | ||
to: "UNTRUSTED" | ||
to_interface: "ethernet1/5" | ||
destination: "any" | ||
service: "0:any/any/any" | ||
translate_to: "src: 2.2.2.2 (dynamic-ip-and-port) (pool idx: 1)" | ||
terminal: "no" |
11 changes: 11 additions & 0 deletions
11
tests/paloalto_panos/show_running_nat-policy/paloalto_panos_show_running_nat-policy2.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"Rule 4 Nat-ID 4; index: 8" { | ||
nat-type ipv4; | ||
from [ Mgmt Data TRUSTED UNTRUSTED ]; | ||
source [ 10.0.0.0/8 172.0.0.0/16 ]; | ||
to [ UNTRUSTED DMZ ]; | ||
to-interface ethernet1/5; | ||
destination [ 1.1.1.1 2.2.2.2 ]; | ||
service 0:any/any/any; | ||
translate-to "src: 3.3.3.3 (dynamic-ip-and-port) (pool idx: 24)"; | ||
terminal no; | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/paloalto_panos/show_running_nat-policy/paloalto_panos_show_running_nat-policy2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
parsed_sample: | ||
- name: "\"Rule 4 Nat-ID 4; index: 8\"" | ||
nat_type: "ipv4" | ||
from: "[ Mgmt Data TRUSTED UNTRUSTED ]" | ||
source: "[ 10.0.0.0/8 172.0.0.0/16 ]" | ||
to: "[ UNTRUSTED DMZ ]" | ||
to_interface: "ethernet1/5" | ||
destination: "[ 1.1.1.1 2.2.2.2 ]" | ||
service: "0:any/any/any" | ||
translate_to: "src: 3.3.3.3 (dynamic-ip-and-port) (pool idx: 24)" | ||
terminal: "no" |