Skip to content
Guides & References

Cisco IOS XR policy templates

The Cisco IOS XR policy templates in rconfig/pro-policy-definitions v1.5.0: what each rule checks, minimum versions, references and framework files.

Policy LibraryUpdated
On this page

Cisco IOS XR policy templates

Policy templates for Cisco routers running 64-bit IOS XR, from the iosxr- files in the cisco/ folder. They check the running configuration as returned by show running-config: top-level commands in column 0, sub-commands indented one space per level, and every block, nested ones included, closed by a ! line. This page documents release v1.5.0. See importing a policy template to load one into rConfig.

For worked examples of these rules, with a passing and a failing config for each, see the Cisco IOS XR platform pages. For IOS and IOS XE, see the Cisco IOS policy templates.

The rules were written from the Cisco NCS 5500, NCS 540 and NCS 560 command references for 64-bit IOS XR (Release 6.0 to 26.x). The sample configs model an ASR 9901 on IOS XR 7.9.2. 32-bit IOS XR (4.x and 5.x on older ASR 9000 and CRS) was not checked. rConfig has no IOS XR connection template of its own; IOS XR devices connect with the IOS SSH templates.

Hardening definitions

IOS XR management access

pro-policy-definitions / cisco /iosxr-management-access.policyView on GitHub
Kind
Hardening
Rules
5
Minimum rConfig
8.0.2
Release
v1.5.0

SSH version 2, no Telnet server and no Telnet in transport input, an exec-timeout of 1 to 10 minutes on every line, and a MOTD or login banner.

Rule Method What it checks
SSH server is enabled for version 2 (ssh server v2) must_match_single_string The config contains the line ssh server v2.
The Telnet server is not enabled (fails on telnet … ipv4 or ipv6 server max-servers) must_not_match_regex No telnet ipv4 server max-servers or telnet ipv6 server max-servers line, with or without vrf.
No transport input line permits Telnet (telnet or all) must_not_match_regex No transport input line lists telnet or all.
No line sets an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default) must_not_match_regex Every indented exec-timeout line is 1 to 9 minutes with 0 to 59 seconds, or exactly 10 or 10 0. 0 0, more than 10 minutes, or 60 seconds or more fails.
A MOTD or login banner is configured (banner motd or banner login) must_match_regex A banner motd or banner login line with text after it.

References

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

Rule NIST SP 800-53 HIPAA (45 CFR) ISO/IEC 27001:2022
SSH server is enabled for version 2 (ssh server v2) AC-17 164.312(a)(1) A.8.24
The Telnet server is not enabled (fails on telnet … ipv4 or ipv6 server max-servers) AC-17 164.312(a)(1) A.8.5
No transport input line permits Telnet (telnet or all) AC-17 164.312(a)(1) A.8.5
No line sets an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default) AC-3 None A.8.5
A MOTD or login banner is configured (banner motd or banner login) None None A.8.5

Known limitations

  • IOS XR does not print a setting at its default. The Telnet server is off by default, so the Telnet server rule fails only on the line that turns it on.
  • exec-timeout 10 0 is the default, so a line with no exec-timeout passes. The rule checks every exec-timeout line in the config (console, line default and any line template), not one named line, because a router that has never set one has no line default block to scope on.
  • ssh server v2 is not the default: the default server accepts version 2 and can fall back to version 1. So the SSH rule requires the line.

IOS XR AAA

pro-policy-definitions / cisco /iosxr-aaa.policyView on GitHub
Kind
Hardening
Rules
3
Minimum rConfig
8.3.0
Release
v1.5.0

Login authentication through a TACACS+ or RADIUS server group, no reversible local passwords and no MD5 local secrets.

Rule Method What it checks
Login authentication uses a TACACS+ or RADIUS server group (aaa authentication login default group …) must_match_regex An aaa authentication login default group line with a group name. A local fallback after the group is allowed.
No local user has a reversible password (fails on password under a username) evaluate_block Scoped to ^username: no username block has an indented password line.
No local user secret uses an MD5 hash (fails on secret 5) must_not_match_regex No indented secret 5 line anywhere in the config.

References

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

Rule NIST SP 800-53 HIPAA (45 CFR) NIST CSF 1.1 ISO/IEC 27001:2022
Login authentication uses a TACACS+ or RADIUS server group (aaa authentication login default group …) AC-2 164.312(a)(1) PR.AC-1 A.8.5
No local user has a reversible password (fails on password under a username) IA-5 None None A.5.17
No local user secret uses an MD5 hash (fails on secret 5) IA-5 None None A.5.17

Known limitations

  • The reversible password rule is the only scoped IOS XR rule. It works because username blocks have no nested sub-blocks. BGP password encrypted and key chain key-string password lines sit outside username blocks and do not count.

IOS XR SNMP

pro-policy-definitions / cisco /iosxr-snmp.policyView on GitHub
Kind
Hardening
Rules
3
Minimum rConfig
8.3.0
Release
v1.5.0

No SNMPv1 or SNMPv2c communities, SNMPv3 users with SHA authentication and AES privacy, and an SNMPv3 authPriv group.

Rule Method What it checks
No SNMPv1 or SNMPv2c community is configured (line snmp-server community is absent) must_not_match_regex No snmp-server community line.
Every SNMP user is v3 with SHA authentication and AES privacy, and none uses v1, v2c, MD5, DES or 3DES (snmp-server user) evaluate_block At least one snmp-server user is v3 with auth sha and priv aes, and no user is v1, v2c or remote, uses auth md5, uses priv des56 or priv 3des, or has no priv.
An SNMPv3 group uses authPriv (snmp-server group … v3 priv) must_match_regex At least one snmp-server group line with v3 priv.

References

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

Rule NIST SP 800-53 HIPAA (45 CFR) ISO/IEC 27001:2022
No SNMPv1 or SNMPv2c community is configured (line snmp-server community is absent) SC-12 164.312(e)(1) A.8.5
Every SNMP user is v3 with SHA authentication and AES privacy, and none uses v1, v2c, MD5, DES or 3DES (snmp-server user) SC-12 164.312(e)(1) A.8.5, A.8.24
An SNMPv3 group uses authPriv (snmp-server group … v3 priv) SC-12 164.312(e)(1) A.8.5, A.8.24

Known limitations

  • Unlike IOS, IOS XR prints SNMP users in show running-config, which is what lets the user rule check them.
  • The group rule passes when any one group is v3 priv. Other groups with a lower security level are not checked.

IOS XR logging

pro-policy-definitions / cisco /iosxr-logging.policyView on GitHub
Kind
Hardening
Rules
3
Minimum rConfig
8.0.2
Release
v1.5.0

A remote syslog host, millisecond log timestamps, and console logging disabled or limited to critical and above.

Rule Method What it checks
A remote syslog host is configured by address (logging <address>) must_match_regex A logging line followed by an IPv4 or IPv6 address.
Log timestamps include milliseconds (fails on service timestamps log without datetime msec) must_not_match_regex No service timestamps log line without datetime and msec.
Console logging is disabled or limited to critical and above (logging console disable, critical, alerts or emergencies) must_match_regex A logging console line set to disable, critical, alerts or emergencies.

References

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

Rule NIST SP 800-53 HIPAA (45 CFR) ISO/IEC 27001:2022
A remote syslog host is configured by address (logging <address>) AU-2 164.312(b) A.8.15
Log timestamps include milliseconds (fails on service timestamps log without datetime msec) AU-3 164.312(b) A.8.15
Console logging is disabled or limited to critical and above (logging console disable, critical, alerts or emergencies) AU-6 164.312(b) None

Known limitations

  • A syslog host given by name is not matched, because a name cannot be told apart from keywords such as logging buffered.
  • Console logging is on at informational by default and not printed, so the console rule needs an explicit logging console line.
  • The timestamp rule passes when no service timestamps log line is printed at all.

IOS XR services

pro-policy-definitions / cisco /iosxr-services.policyView on GitHub
Kind
Hardening
Rules
5
Minimum rConfig
8.0.2
Release
v1.5.0

No TFTP server, IPv4 source routing, directed broadcast, proxy ARP or ICMP redirects.

Rule Method What it checks
The TFTP server is not enabled (fails on tftp ipv4 or ipv6 server) must_not_match_regex No tftp ipv4 server or tftp ipv6 server line, with or without vrf.
IPv4 source routing is not enabled (fails on ipv4 source-route) must_not_match_regex No ipv4 source-route line.
Directed broadcast is not enabled on any interface (fails on ipv4 directed-broadcast) must_not_match_regex No indented ipv4 directed-broadcast line.
Proxy ARP is not enabled on any interface (fails on proxy-arp) must_not_match_regex No indented proxy-arp line.
ICMP redirects are not enabled on any interface (fails on ipv4 redirects) must_not_match_regex No indented ipv4 redirects line.

References

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

Rule NIST SP 800-53 HIPAA (45 CFR) ISO/IEC 27001:2022
The TFTP server is not enabled (fails on tftp ipv4 or ipv6 server) CM-7 164.312(c)(1) A.8.9
IPv4 source routing is not enabled (fails on ipv4 source-route) SC-5 None A.8.20
Directed broadcast is not enabled on any interface (fails on ipv4 directed-broadcast) SC-7 None A.8.20
Proxy ARP is not enabled on any interface (fails on proxy-arp) SC-7 None A.8.20
ICMP redirects are not enabled on any interface (fails on ipv4 redirects) None None A.8.20

Known limitations

  • All five features are off by default and IOS XR does not print defaults, so each rule fails only on the line that turns its feature on.
  • There is no BGP neighbour password rule. rConfig’s block splitter ends a scoped block at the first line that is ! once trimmed, so a scope: ^router bgp rule would stop at the first nested !, before most neighbours. This is also why almost every IOS XR rule is an unscoped regex.

Framework files

Framework files are generated from the hardening files above. Each one collects every hardening rule that lists a reference for one framework, copied unchanged, with the control reference added to the start of its description (for example NIST AC-17: ...). The rule tables, references and known limitations are in the topic sections linked below.

Framework File Rules Minimum rConfig Collects rules from
NIST SP 800-53 iosxr-nist-800-53.policy 17 8.3.0 IOS XR AAA, IOS XR logging, IOS XR management access, IOS XR services, IOS XR SNMP
NIST CSF 1.1 iosxr-nist-csf.policy 1 8.0.0 IOS XR AAA
HIPAA Security Rule (45 CFR 164.312) iosxr-hipaa.policy 11 8.3.0 IOS XR AAA, IOS XR logging, IOS XR management access, IOS XR services, IOS XR SNMP
ISO/IEC 27001:2022 Annex A iosxr-iso27001.policy 18 8.3.0 IOS XR AAA, IOS XR logging, IOS XR management access, IOS XR services, IOS XR SNMP

A framework file lists checks relevant to that framework. It is not a certification or a full assessment, and a device that passes it is not certified against the framework.

Operational standards

IOS XR operational standards

pro-policy-definitions / cisco /iosxr-operational-standards.policyView on GitHub
Kind
Operational standards
Rules
7
Minimum rConfig
8.3.0
Release
v1.5.0

Checks drift from your own operational standard, not a hardening baseline: standard NTP, syslog and DNS servers, a MOTD or login banner, a description on every interface that is not shut down, a hostname naming pattern and an SNMP location. Replace the example values (RFC 5737 addresses such as 192.0.2.10, and the hostname pattern) with your own before use.

Rule Method What it checks
NTP servers are set to your standard (replace 192.0.2.10 and 192.0.2.11) evaluate_block A server line for 192.0.2.10 and one for 192.0.2.11, with or without vrf and ipv4.
Syslog servers are set to your standard (replace 192.0.2.20 and 192.0.2.21) evaluate_block A logging 192.0.2.20 line and a logging 192.0.2.21 line.
DNS servers are set to your standard (replace 192.0.2.30 and 192.0.2.31) evaluate_block The lines domain name-server 192.0.2.30 and domain name-server 192.0.2.31.
A MOTD or login banner is set (banner motd or banner login, any text; nothing to replace) must_match_regex A banner motd or banner login line with text after it.
Every top-level interface that is not shut down has a description (nothing to replace) must_not_match_regex No top-level interface block (other than interface preconfigure) closes with ! without a description or shutdown line.
The hostname follows your naming pattern (replace the example pattern [a-z]{3}-(rtr|sw)[0-9]{2}, for example dub-rtr01) must_match_regex The hostname line matches the pattern exactly.
An SNMP location is set (snmp-server location, any text; nothing to replace) must_match_regex An snmp-server location line with text.

Known limitations

  • The NTP, syslog and DNS rules check that each standard server is configured, not that no other server is.
  • The NTP rule does not check that the server line is inside the ntp block, so a TACACS+ group server line with the same address also counts.
  • All the rules are regular expressions: escape the dots when you replace an address, for example 192\.0\.2\.10.
  • The interface rule uses a regex anchored at column 0, not scope: ^interface, because rConfig matches a scope anchor against the line with its indentation removed and would also pick up the indented interface lines under router isis and mpls ldp.

Type to search.