Skip to content
Guides & References

PAN-OS logging

Worked examples for the PAN-OS logging template: a syslog server profile with an address, and system and configuration logs sent to syslog.

Policy LibraryUpdated
Platform
palo-alto-panos
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

PAN-OS logging

Rules that make sure the firewall’s own logs leave the box: a syslog server to send to, and system and configuration logs forwarded to it. They come from the panos-logging policy template.

Every example on this page was checked with rConfig Pro's policy engine on

Each of the 8 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template. A card marked changed has one line edited to show a failure.

All the rules come from panos-logging.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The Palo Alto PAN-OS templates page lists the file’s known limitations. Run the rules against show config running (brace format).

Rule Method Since
A syslog server profile with an address evaluate_block 8.3.0
System logs sent to syslog evaluate_block 8.3.0
Configuration logs sent to syslog evaluate_block 8.3.0

A syslog server profile with an address

Logs kept only on the firewall are lost if it fails or is tampered with. This rule checks each syslog block for a server line with an address. If the config has no syslog block at all, the rule fails.

Definition
// A syslog server profile has a server address (shared log-settings syslog ... server)
#[evaluate_block]
scope: ^syslog \{
all:
- regex: '/(^|[{;])\s*server [^{\s;]+;/m'
passPassing config: Hardened PA-3220 sample (PAN-OS 11.1.4, synthetic)
syslog {
CORP-SYSLOG {
server {
SYSLOG01 {
server 192.0.2.20;
transport UDP;
port 514;
format BSD;
facility LOG_USER;
}
}
}
}

Why: The CORP-SYSLOG profile sends to 192.0.2.20.

failFailing config: Unhardened PA-3220 sample (PAN-OS 11.1.4, synthetic)
log-settings {
system {
match-list {
system-all {
filter "All Logs";
}
}
}
}

Why: There is no syslog server profile, so there is no block to check.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AU-2, AU-12
NIST CSF 1.1 DE.CM-1
HIPAA (45 CFR) 164.312(b)
ISO/IEC 27001:2022 Annex A A.8.15

Tested with: sample excerpts from PAN-OS 11.1.4 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


System logs sent to syslog

System logs record events such as logins, HA changes and commits. This rule looks in log-settings for a system match list with send-syslog. A log forwarding profile that sends traffic or threat logs to syslog does not count.

Definition
// System logs are forwarded to syslog (log-settings system match-list send-syslog)
#[evaluate_block]
scope: ^log-settings \{$
any:
- regex: '/^(\s*)system \{\n(?:\1\s.*\n)*?\1\s.*\bsend-syslog /m'
- regex: '/^\s*system \{[^\n]*\bsend-syslog /m'
passPassing config: Hardened PA-3220 sample (PAN-OS 11.1.4, synthetic)
log-settings {
system {
match-list {
system-all {
filter "All Logs";
send-syslog CORP-SYSLOG;
}
}
}
}

Why: System logs go to CORP-SYSLOG.

passPassing config: Hardened PA-3220 sample, one-line layout (PAN-OS 11.1.4, synthetic)
log-settings {
system {
match-list {
system-all { filter "All Logs"; send-syslog CORP-SYSLOG; }
}
}
}

Why: The same match list printed on one line gives the same result.

failFailing config: Unhardened PA-3220 sample (PAN-OS 11.1.4, synthetic)
log-settings {
system {
match-list {
system-all {
filter "All Logs";
}
}
}
}

Why: The system match list has no send-syslog.

failFailing config: Hardened PA-3220 sample (PAN-OS 11.1.4, synthetic), changed: send-syslog removed from system-all
log-settings {
profiles {
CORP-LOG-FWD {
match-list {
traffic-all {
log-type traffic;
filter "All Logs";
send-syslog CORP-SYSLOG;
}
}
}
}
system {
match-list {
system-all {
filter "All Logs";
}
}
}
}

Why: Traffic logs go to syslog, but that does not count for system logs.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing config 1passPASS
Passing config 2passPASS
Failing config 1failFAIL
Failing config 2failFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AU-2, AU-12
HIPAA (45 CFR) 164.312(b)
ISO/IEC 27001:2022 Annex A A.8.15

Tested with: sample excerpts from PAN-OS 11.1.4 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


Configuration logs sent to syslog

Configuration logs record who changed what. This rule looks in log-settings for a config match list with send-syslog.

Definition
// Configuration logs are forwarded to syslog (log-settings config match-list send-syslog)
#[evaluate_block]
scope: ^log-settings \{$
any:
- regex: '/^(\s*)config \{\n(?:\1\s.*\n)*?\1\s.*\bsend-syslog /m'
- regex: '/^\s*config \{[^\n]*\bsend-syslog /m'
passPassing config: Hardened PA-3220 sample (PAN-OS 11.1.4, synthetic)
log-settings {
system {
match-list {
system-all {
filter "All Logs";
send-syslog CORP-SYSLOG;
}
}
}
config {
match-list {
config-all {
filter "All Logs";
send-syslog CORP-SYSLOG;
}
}
}
}

Why: Configuration logs go to CORP-SYSLOG.

failFailing config: Unhardened PA-3220 sample (PAN-OS 11.1.4, synthetic)
log-settings {
system {
match-list {
system-all {
filter "All Logs";
}
}
}
}

Why: There is no config match list.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AU-2, AU-12
HIPAA (45 CFR) 164.312(b)
ISO/IEC 27001:2022 Annex A A.8.15

Tested with: sample excerpts from PAN-OS 11.1.4 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


Type to search.