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.
// A syslog server profile has a server address (shared log-settings syslog ... server)#[evaluate_block]scope: ^syslog \{all: - regex: '/(^|[{;])\s*server [^{\s;]+;/m'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.
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:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
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.
// 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'log-settings { system { match-list { system-all { filter "All Logs"; send-syslog CORP-SYSLOG; } } }}Why: System logs go to CORP-SYSLOG.
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.
log-settings { system { match-list { system-all { filter "All Logs"; } } }}Why: The system match list has no send-syslog.
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:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config 1 | pass | PASS |
| Passing config 2 | pass | PASS |
| Failing config 1 | fail | FAIL |
| Failing config 2 | fail | FAIL |
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.
// 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'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.
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:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
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.
Related reference
- Palo Alto PAN-OS policy templates: every rule in
panos-logging.policy, its references and known limitations. - Policy Definitions: the definition file format and every method.
- Policy Assignments: run a definition against your devices.
- Policy Compliance Results: read the pass and fail results.