IOS XR management access
Rules for how people log in to the router: SSH version 2 only, no Telnet anywhere, idle sessions closed within 10 minutes, and a warning banner. They come from the iosxr-management-access policy template.
Every example on this page was checked with rConfig Pro's policy engine on Each of the 10 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.
All the rules come from iosxr-management-access.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 Cisco IOS XR templates page lists the file’s known limitations. Run the rules against show running-config.
| Rule | Method | Since |
|---|---|---|
| SSH server version 2 | must_match_single_string |
8.0.0 |
| No Telnet server | must_not_match_regex |
8.0.2 |
| No Telnet in transport input | must_not_match_regex |
8.0.2 |
| Exec-timeout of 1 to 10 minutes | must_not_match_regex |
8.0.2 |
| MOTD or login banner | must_match_regex |
8.0.0 |
SSH server version 2
The default IOS XR SSH server accepts version 2 but can fall back to version 1, which has known weaknesses. This rule looks for the exact line ssh server v2, which limits the server to version 2.
// SSH server is enabled for version 2 (ssh server v2)#[must_match_single_string]ssh server v2ssh client vrf MGMTssh server loggingssh server rate-limit 60ssh server session-limit 10ssh server v2ssh server vrf MGMTssh timeout 60Why: The ssh server v2 line is there.
ssh client vrf MGMTssh server loggingssh server rate-limit 60ssh server session-limit 10ssh server vrf MGMTssh timeout 60Why: There is no ssh server v2 line, so version 1 is still allowed.
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 | AC-17 |
| HIPAA (45 CFR) | 164.312(a)(1) |
| ISO/IEC 27001:2022 Annex A | A.8.24 |
Tested with: sample excerpts from IOS XR 7.9.2 (synthetic). Minimum rConfig 8.0.0 (must_match_single_string). Editions: Pro, Vector, Enterprise.
No Telnet server
Telnet sends usernames and passwords in clear text. On IOS XR the Telnet server only runs when a telnet ... ipv4 server max-servers or ipv6 server max-servers line turns it on, with or without a VRF. This rule fails on any such line.
// The Telnet server is not enabled (fails on telnet ... ipv4 or ipv6 server max-servers)#[must_not_match_regex]/^telnet (vrf \S+ )?ipv[46] server max-servers/mlldp!ssh client vrf MGMTssh server loggingssh server rate-limit 60ssh server session-limit 10ssh server v2ssh server vrf MGMTssh timeout 60endWhy: No line turns on the Telnet server.
lldp!telnet vrf default ipv4 server max-servers 10tftp ipv4 server homedir disk0:ssh client vrf MGMTssh server loggingssh server rate-limit 60ssh server session-limit 10ssh server vrf MGMTssh timeout 60endWhy: The Telnet server is on in the default VRF.
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 | AC-17 |
| HIPAA (45 CFR) | 164.312(a)(1) |
| ISO/IEC 27001:2022 Annex A | A.8.5 |
Tested with: sample excerpts from IOS XR 7.9.2 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
No Telnet in transport input
Even with SSH set up, a line that accepts Telnet lets someone log in without encryption. This rule fails if any transport input line lists telnet or all.
// No transport input line permits Telnet (telnet or all)#[must_not_match_regex]/^\s*transport input .*\b(telnet|all)\b/mline default exec-timeout 5 0 login authentication default session-limit 10 transport input ssh transport output ssh!Why: Only SSH is accepted.
line default exec-timeout 15 0 login authentication default session-limit 10 transport input ssh telnet transport output ssh!Why: The line accepts Telnet as well as SSH.
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 | AC-17 |
| HIPAA (45 CFR) | 164.312(a)(1) |
| ISO/IEC 27001:2022 Annex A | A.8.5 |
Tested with: sample excerpts from IOS XR 7.9.2 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
Exec-timeout of 1 to 10 minutes
An idle session that never times out stays logged in for anyone who walks up to it. This rule checks every exec-timeout line in the config. It passes with 1 to 9 minutes (and 0 to 59 seconds) or exactly 10 or 10 0. It fails on 0 0 (never time out), more than 10 minutes, or 60 seconds or more. A line with no exec-timeout uses the 10 minute default and passes.
// No line sets an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)#[must_not_match_regex]/^\s+exec-timeout (?!(?:[1-9](?: [1-5]?[0-9])?|10(?: 0)?)\s*$)/mline console exec-timeout 10 0 login authentication default!line default exec-timeout 5 0 login authentication default session-limit 10 transport input ssh transport output ssh!Why: 10 minutes on the console and 5 on line default.
line console exec-timeout 0 0 login authentication default!line default exec-timeout 15 0 login authentication default session-limit 10 transport input ssh telnet transport output ssh!Why: The console never times out and line default allows 15 minutes.
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 | AC-3 |
| ISO/IEC 27001:2022 Annex A | A.8.5 |
Tested with: sample excerpts from IOS XR 7.9.2 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
MOTD or login banner
A banner tells anyone connecting that access is restricted and monitored. This rule passes when there is a banner motd or banner login line with some text after it.
// A MOTD or login banner is configured (banner motd or banner login)#[must_match_regex]/^banner (motd|login) \S/mvty-pool default 0 9 line-template defaultbanner motd ^Authorised access only.All sessions are logged and monitored by the NOC.^ntp server vrf MGMT 192.0.2.10 preferWhy: A MOTD banner is set.
vty-pool default 0 9 line-template defaultntp server vrf MGMT 192.0.2.1 preferWhy: There is no banner.
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 |
|---|---|
| ISO/IEC 27001:2022 Annex A | A.8.5 |
Tested with: sample excerpts from IOS XR 7.9.2 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- Cisco IOS XR policy templates: every rule in
iosxr-management-access.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.