Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix1037_paloalto_panos_show_running_nat-policy #1040

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
jmcgill298 marked this conversation as resolved.
Show resolved Hide resolved
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"