OcNOS logging
Rules that keep a record of what happens on the router: logs sent to a remote syslog server, with timestamps precise enough to line events up. They come from the ocnos-logging policy template.
Every example on this page was checked with rConfig Pro's policy engine on Each of the 5 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 (two lines on the remote syslog rule, because the sample has two servers).
All the rules come from ocnos-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 IP Infusion OcNOS templates page lists the file’s known limitations. Run the rules against show running-config.
| Rule | Method | Since |
|---|---|---|
| A remote syslog server is configured | must_match_regex |
8.0.0 |
| Log timestamps are not set to seconds or none | must_not_match_regex |
8.0.2 |
A remote syslog server is configured
Logs kept only on the router are lost when it reboots, and an attacker on the box can clear them. The rule passes when there is at least one logging remote server line, with any address, severity, port or VRF.
// A remote syslog server is configured (logging remote server)#[must_match_regex]/^logging remote server \S+/mfeature rsysloglogging remote server 192.0.2.20 5 port 1514 vrf managementlogging remote server 192.0.2.21 5 port 1514 vrf managementWhy: Two remote syslog servers are set.
feature ntp vrf managementfeature rsysloglogging remote server 198.51.100.217 5 port 1514 vrf managementWhy: One remote syslog server is set. The address is sanitised.
feature ntp vrf managementfeature rsysloglldp runWhy: rsyslog is on, but there is no remote server. One line removed is not enough here, because the hardened sample has two servers.
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 | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| NIST SP 800-53 | AU-2 |
| HIPAA (45 CFR) | 164.312(b) |
| ISO/IEC 27001:2022 Annex A | A.8.15 |
Tested with: sample excerpts from OcNOS-SP 7.0.0. Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Log timestamps are not set to seconds or none
Timestamps in seconds, or none at all, make it hard to put events from several devices in order. The rule fails only on logging timestamp seconds or logging timestamp none. No sample sets a timestamp line, so both samples pass.
// Log timestamps are not set to seconds or none (fails on logging timestamp seconds or none)#[must_not_match_regex]/^logging timestamp (seconds|none)[ \t]*$/mservice password-encryption!logging level nsm 4logging level cmm 4Why: There is no logging timestamp line. These two lines end with a space, as OcNOS prints them.
service password-encryption!logging timestamp secondslogging level nsm 4logging level cmm 4Why: Timestamps are set to seconds.
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-3 |
| HIPAA (45 CFR) | 164.312(b) |
| ISO/IEC 27001:2022 Annex A | A.8.15 |
Tested with: sample excerpts from OcNOS-SP 7.0.0. Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- IP Infusion OcNOS policy templates: every rule in
ocnos-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.