Skip to content

Commit

Permalink
fix1037_paloalto_panos_show_running_nat-policy
Browse files Browse the repository at this point in the history
- add 2 more raw examples
  • Loading branch information
Pieter E Smit committed Dec 14, 2021
1 parent d8c74b3 commit 45d3018
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 16 deletions.
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
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;
}
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"
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;
}
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"

0 comments on commit 45d3018

Please sign in to comment.