Skip to content
Guides & References

IOS XR management access

Worked examples for the IOS XR management access template: SSH version 2, no Telnet server or Telnet transport, exec-timeouts of 1 to 10 minutes and a banner.

Policy LibraryUpdated
Platform
cisco-ios-xr
Minimum version
rConfig 8.0.2
Editions
Pro, Vector, Enterprise
On this page

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.

Definition
// SSH server is enabled for version 2 (ssh server v2)
#[must_match_single_string]
ssh server v2
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
ssh client vrf MGMT
ssh server logging
ssh server rate-limit 60
ssh server session-limit 10
ssh server v2
ssh server vrf MGMT
ssh timeout 60

Why: The ssh server v2 line is there.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
ssh client vrf MGMT
ssh server logging
ssh server rate-limit 60
ssh server session-limit 10
ssh server vrf MGMT
ssh timeout 60

Why: 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:

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 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.

Definition
// 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/m
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
lldp
!
ssh client vrf MGMT
ssh server logging
ssh server rate-limit 60
ssh server session-limit 10
ssh server v2
ssh server vrf MGMT
ssh timeout 60
end

Why: No line turns on the Telnet server.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
lldp
!
telnet vrf default ipv4 server max-servers 10
tftp ipv4 server homedir disk0:
ssh client vrf MGMT
ssh server logging
ssh server rate-limit 60
ssh server session-limit 10
ssh server vrf MGMT
ssh timeout 60
end

Why: The Telnet server is on in the default VRF.

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 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.

Definition
// No transport input line permits Telnet (telnet or all)
#[must_not_match_regex]
/^\s*transport input .*\b(telnet|all)\b/m
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
line default
exec-timeout 5 0
login authentication default
session-limit 10
transport input ssh
transport output ssh
!

Why: Only SSH is accepted.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
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:

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 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.

Definition
// 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*$)/m
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
line 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.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
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:

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 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.

Definition
// A MOTD or login banner is configured (banner motd or banner login)
#[must_match_regex]
/^banner (motd|login) \S/m
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
vty-pool default 0 9 line-template default
banner motd ^
Authorised access only.
All sessions are logged and monitored by the NOC.
^
ntp
server vrf MGMT 192.0.2.10 prefer

Why: A MOTD banner is set.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
vty-pool default 0 9 line-template default
ntp
server vrf MGMT 192.0.2.1 prefer

Why: There is no banner.

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
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.


Type to search.