Skip to content
Guides & References

Cisco IOS stock definitions

The Cisco IOS and IOS XE stock policy definitions in rconfig/pro-policy-definitions v1.4.0: what each rule checks, minimum versions, status, references and framework files.

Policy LibraryUpdated
On this page

Cisco IOS stock definitions

Stock definitions for Cisco IOS and IOS XE, from the cisco/ folder. They check the running configuration as returned by show running-config. This page documents release v1.4.0. See importing a stock template to load one into rConfig.

For tested worked examples of IOS-XE rules, with passing and failing configs, see the Cisco IOS-XE platform pages.

Hardening definitions

Cisco IOS management access

ios-management-access.policy · 6 rules · minimum rConfig 8.3.0 · Lab tested

SSH version 2, no Telnet on any line, an exec-timeout of 1 to 10 minutes on the console and every VTY line, and MOTD and login banners.

RuleMethodWhat it checks
SSH version 2 is enabled (ip ssh version 2)must_match_single_stringA line reads exactly ip ssh version 2.
No transport input line permits Telnet (telnet or all)must_not_match_regexNo transport input line, on any line block, includes telnet or all. transport input telnet ssh and transport input all both fail.
No VTY line block sets an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)evaluate_blockEach line vty block is checked on its own. A block passes with an exec-timeout of 1 to 9 minutes and 0 to 59 seconds, or exactly 10 0, and with no exec-timeout line, because 10 minutes is the default and IOS does not print it. 0 0 (no timeout), any other value under one minute and anything over 10 minutes fail.
The console line does not set an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)evaluate_blockThe same check for the line con block.
A MOTD banner is configured (banner motd)must_match_regexA line starts with banner motd followed by banner text.
A login banner is configured (banner login)must_match_regexA line starts with banner login followed by banner text.

References

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

RuleNIST SP 800-53HIPAA (45 CFR)ISO/IEC 27001:2022
SSH version 2 is enabled (ip ssh version 2)AC-17164.312(a)(1)A.8.24
No transport input line permits Telnet (telnet or all)AC-17164.312(a)(1)A.8.5
No VTY line block sets an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)AC-3NoneA.8.5
The console line does not set an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)AC-3NoneA.8.5
A MOTD banner is configured (banner motd)NoneNoneA.8.5
A login banner is configured (banner login)NoneNoneA.8.5

Known limitations

  • The Telnet rule uses a regex because must_not_match_single_string compares whole lines, so transport input telnet would not catch transport input telnet ssh.
  • exec-timeout 10 0 is the IOS default and is not printed, so a line block with no exec-timeout line passes.
  • A seconds value of 60 or more fails, even when the total is 10 minutes or less (for example exec-timeout 0 300).

Cisco IOS AAA and local credentials

ios-aaa.policy · 4 rules · minimum rConfig 8.0.2 · Lab tested

AAA enabled, a hashed enable secret, password encryption and no plaintext local passwords.

RuleMethodWhat it checks
AAA is enabled (aaa new-model)must_match_single_stringA line reads exactly aaa new-model.
The enable secret is set with a hash type (enable secret <type> …)must_match_regexA line starts with enable secret, then a numeric hash type, then the hash.
Password encryption is enabled (service password-encryption)must_match_single_stringA line reads exactly service password-encryption.
No local user has a type 0 plaintext password (username … password 0)must_not_match_regexNo username line stores its password as password 0, which is plaintext.

References

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

RuleNIST SP 800-53HIPAA (45 CFR)ISO/IEC 27001:2022
AAA is enabled (aaa new-model)AC-2164.312(a)(1)A.8.5
The enable secret is set with a hash type (enable secret <type> …)IA-5NoneA.5.17
Password encryption is enabled (service password-encryption)CM-6NoneA.5.17
No local user has a type 0 plaintext password (username … password 0)IA-5NoneA.5.17

Known limitations

  • No rule checks login authentication default on the console or VTY lines. It is the default method list, so IOS does not print it, and a rule that required it failed on compliant configs. Release v1.2.0 removed those two rules.

Cisco IOS SNMP

ios-snmp.policy · 2 rules · minimum rConfig 8.0.2 · Lab tested

No SNMPv1 or SNMPv2c communities, and an SNMPv3 authPriv group.

RuleMethodWhat it checks
No SNMPv1 or SNMPv2c community is configured (line snmp-server community is absent)must_not_match_regexNo line starts with snmp-server community.
An SNMPv3 group uses authPriv (snmp-server group … v3 priv)must_match_regexAn snmp-server group line uses v3 priv, which is authentication with encryption.

References

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

RuleNIST SP 800-53HIPAA (45 CFR)ISO/IEC 27001:2022
No SNMPv1 or SNMPv2c community is configured (line snmp-server community is absent)SC-12164.312(e)(1)A.8.5
An SNMPv3 group uses authPriv (snmp-server group … v3 priv)SC-12164.312(e)(1)A.8.5, A.8.24

Known limitations

  • SNMPv3 users (snmp-server user) are not shown in the running config, so no rule checks them.

Cisco IOS logging

ios-logging.policy · 5 rules · minimum rConfig 8.0.2 · Lab tested

Remote syslog host, millisecond log timestamps (with or without localtime, show-timezone or year), no console logging, buffered logging and a trap severity level.

RuleMethodWhat it checks
A remote syslog host is configured (logging host)must_match_regexA line starts with logging host followed by a host.
Log timestamps use datetime msec, with or without other options (service timestamps log datetime msec …)must_match_regexA service timestamps log datetime line includes msec, with or without other options such as localtime show-timezone or year. A datetime line without msec, or uptime, fails.
Console logging is off (no logging console line at any level)must_not_match_regexNo line starts with logging console, at any severity level. no logging console still passes.
Buffered logging is configured (logging buffered)must_match_regexA line starts with logging buffered followed by a size or level.
The logging trap severity level is set (logging trap <level>)must_match_regexA logging trap line names one of the severity keywords, from emergencies to informational. debugging is not accepted.

References

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

RuleNIST SP 800-53HIPAA (45 CFR)ISO/IEC 27001:2022
A remote syslog host is configured (logging host)AU-2164.312(b)A.8.15
Log timestamps use datetime msec, with or without other options (service timestamps log datetime msec …)AU-3164.312(b)A.8.15
Console logging is off (no logging console line at any level)AU-6164.312(b)None
Buffered logging is configured (logging buffered)AU-2NoneA.8.15
The logging trap severity level is set (logging trap <level>)AU-3NoneA.8.15

Cisco IOS interface and L2 security

ios-l2-security.policy · 2 rules · minimum rConfig 8.3.0 · Lab tested

Proxy ARP disabled on every interface with an IP address, and every interface shut down or described.

RuleMethodWhat it checks
Every interface with an IP address has proxy ARP disabled (no ip proxy-arp)evaluate_blockEach interface block is checked on its own. A block with an ip address line must also contain no ip proxy-arp. Interfaces without an IP address, such as switch ports, pass.
Every interface is shut down or has a descriptionevaluate_blockEach interface block must contain a shutdown line or a description. An interface with neither, which is likely unused, fails. no shutdown does not count as shut down.

References

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

RuleNIST SP 800-53ISO/IEC 27001:2022
Every interface with an IP address has proxy ARP disabled (no ip proxy-arp)SC-7A.8.20
Every interface is shut down or has a descriptionSI-4A.8.20

Known limitations

  • Proxy ARP is checked only on interfaces with an IP address, and an interface with a description counts as in use.

Cisco IOS routing protocol authentication

ios-routing-authentication.policy · 2 rules · minimum rConfig 8.3.0 · Lab tested

OSPF message-digest area authentication on every OSPF process, and a BGP neighbor password.

RuleMethodWhat it checks
Every OSPF process enables message-digest authentication for an area (area … authentication message-digest)evaluate_blockEach router ospf block must contain an area ... authentication message-digest line.
At least one BGP neighbor has a password (neighbor … password)must_match_regexAt least one neighbor line sets a password. Other neighbors without a password are not checked.

References

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

RuleISO/IEC 27001:2022
Every OSPF process enables message-digest authentication for an area (area … authentication message-digest)A.8.20
At least one BGP neighbor has a password (neighbor … password)A.8.20

Known limitations

  • A scoped rule fails when no config block matches its scope, so a config with no OSPF process fails the OSPF rule.

Cisco IOS services

ios-services.policy · 11 rules · minimum rConfig 8.0.2 · Lab tested

HTTP and HTTPS servers, finger (service finger or ip finger), TCP and UDP small servers, identd and directed broadcast are not enabled; BOOTP, source routing, CDP and PAD are disabled with their no lines.

RuleMethodWhat it checks
The HTTP server is not enabled (line ip http server is absent)must_not_match_single_stringNo line reads ip http server.
The HTTPS server is not enabled (line ip http secure-server is absent)must_not_match_single_stringNo line reads ip http secure-server.
The finger service is not enabled (fails on a service finger or ip finger line)must_not_match_regexNo line starts with service finger or ip finger. IOS 12.1 and later use ip finger.
The BOOTP server is disabled (no ip bootp server)must_match_single_stringA line reads exactly no ip bootp server. BOOTP is on by default, so the config shows only the no form when it is disabled.
TCP small servers are not enabled (line service tcp-small-servers is absent)must_not_match_single_stringNo line reads service tcp-small-servers.
UDP small servers are not enabled (line service udp-small-servers is absent)must_not_match_single_stringNo line reads service udp-small-servers.
The PAD service is disabled (no service pad)must_match_single_stringA line reads exactly no service pad. PAD is on by default, so the config shows only the no form when it is disabled.
IP source routing is disabled (no ip source-route)must_match_single_stringA line reads exactly no ip source-route. Source routing is on by default, so the config shows only the no form when it is disabled.
The identd service is not enabled (line ip identd is absent)must_not_match_single_stringNo line reads ip identd.
CDP is disabled globally (no cdp run)must_match_single_stringA line reads exactly no cdp run. CDP is on by default, so the config shows only the no form when it is disabled.
Directed broadcast is not enabled on any interface (fails on any ip directed-broadcast line)must_not_match_regexNo interface has an ip directed-broadcast line, with or without an access list. Directed broadcast is off by default and no ip directed-broadcast is not printed, so a config without the line passes.

References

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

RuleNIST SP 800-53HIPAA (45 CFR)ISO/IEC 27001:2022
The HTTP server is not enabled (line ip http server is absent)CM-7NoneA.8.9
The HTTPS server is not enabled (line ip http secure-server is absent)CM-7NoneA.8.9
The finger service is not enabled (fails on a service finger or ip finger line)CM-7164.312(c)(1)A.8.9
The BOOTP server is disabled (no ip bootp server)CM-7164.312(c)(1)A.8.9
TCP small servers are not enabled (line service tcp-small-servers is absent)CM-7164.312(c)(1)A.8.9
UDP small servers are not enabled (line service udp-small-servers is absent)CM-7NoneA.8.9
The PAD service is disabled (no service pad)NoneNoneA.8.9
IP source routing is disabled (no ip source-route)SC-5NoneA.8.20
The identd service is not enabled (line ip identd is absent)NoneNoneA.8.9
CDP is disabled globally (no cdp run)CM-7NoneA.8.9
Directed broadcast is not enabled on any interface (fails on any ip directed-broadcast line)SC-7NoneA.8.20

Known limitations

  • IOS does not print a setting that is at its default. BOOTP, source routing, CDP and PAD are on by default, so those rules require the no line. Directed broadcast is off by default, so that rule fails only when an ip directed-broadcast line is present.

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.

FrameworkFileRulesMinimum rConfigStatusCollects rules from
NIST SP 800-53ios-nist-800-53.policy268.3.0Lab testedCisco IOS AAA and local credentials, Cisco IOS interface and L2 security, Cisco IOS logging, Cisco IOS management access, Cisco IOS services, Cisco IOS SNMP
HIPAA Security Rule (45 CFR 164.312)ios-hipaa.policy118.0.2Lab testedCisco IOS AAA and local credentials, Cisco IOS logging, Cisco IOS management access, Cisco IOS services, Cisco IOS SNMP
ISO/IEC 27001:2022 Annex Aios-iso27001.policy318.3.0Lab testedCisco IOS AAA and local credentials, Cisco IOS interface and L2 security, Cisco IOS logging, Cisco IOS management access, Cisco IOS routing protocol authentication, Cisco IOS services, Cisco IOS SNMP

No Cisco hardening rule lists a NIST CSF 1.1 reference, so there is no Cisco file for it.

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

Cisco IOS baseline standard

ios-baseline.policy · 11 rules · minimum rConfig 8.3.0 · Synthetic tested

A baseline standard for Cisco IOS and IOS XE: edit the values to match your own. One block per section, each named Cisco <Section> Standard, so the report shows a result per section. The IOS-XE baseline standard page walks through each section with passing and failing configs and how to adapt the values.

RuleMethodWhat it checks
Cisco Services Standardmust_match_all_from_arrayservice timestamps debug datetime msec, service timestamps log datetime msec and no service dhcp each appear in the config.
Cisco DNS Standardmust_match_all_from_arrayno ip domain lookup, ip domain name example.com, ip name-server 192.0.2.53 and ip name-server 198.51.100.53 each appear in the config.
Cisco NTP Standardmust_match_all_from_arrayntp server 192.0.2.10 and ntp server 192.0.2.11 each appear in the config.
Cisco Other Standardmust_match_all_from_arrayaaa new-model and ipv6 unicast-routing each appear in the config.
Cisco Creds Standardwildcard_match_single_stringA username admin privilege 15 secret 9 line exists, with any hash.
Cisco Creds Standard: no plaintext passwordsmust_not_match_regexNo line contains password 0 followed by a value.
Cisco HTTP Standardmust_match_all_from_arrayno ip http server, ip http authentication local and no ip http secure-server each appear in the config.
Cisco Routing Standardwildcard_match_single_stringAn ip route 0.0.0.0 0.0.0.0 line exists, with any next hop.
Cisco SSH Standardmust_match_single_stringA line reads exactly ip ssh version 2.
Cisco SNMP Standardmust_match_all_from_arraysnmp-server group SNMPV3GROUP v3 priv and snmp-server host 192.0.2.50 version 3 priv SNMPV3USER each appear in the config.
Cisco VTY Standardevaluate_blockEach line vty block is checked on its own: it must have a line that reads exactly transport input ssh, and no password line.

References

Published references recorded in the sidecar, for reading only. The framework files collect hardening files, so these rules are not in them. A rule provides evidence towards a control; it does not make a device compliant with it.

RuleNIST SP 800-53HIPAA (45 CFR)ISO/IEC 27001:2022
Cisco NTP StandardAU-8NoneA.8.17
Cisco Creds StandardIA-5NoneA.5.17
Cisco Creds Standard: no plaintext passwordsIA-5NoneA.5.17
Cisco HTTP StandardCM-7NoneA.8.9
Cisco SSH StandardAC-17164.312(a)(1)A.8.24
Cisco SNMP StandardSC-12164.312(e)(1)A.8.5, A.8.24
Cisco VTY StandardAC-17164.312(a)(1)A.8.5

Known limitations

  • Array blocks match each line as text anywhere in the config, so ntp server 192.0.2.10 also matches ntp server 192.0.2.100, and lines with extra options, such as prefer, still pass.
  • Each name server must be on its own ip name-server line. A device that shows both on one line fails the DNS block.
  • A config with no line vty block fails the VTY block.

Cisco IOS operational standards

ios-operational-standards.policy · 7 rules · minimum rConfig 8.3.0 · Synthetic tested

Checks drift from your own operational standard, not a hardening baseline: standard NTP, syslog and DNS servers, a 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.

RuleMethodWhat it checks
NTP servers are set to your standard (replace 192.0.2.10 and 192.0.2.11)evaluate_blockAn ntp server line exists for each address, with or without vrf <name> before it or options such as prefer after it.
Syslog servers are set to your standard (replace 192.0.2.20 and 192.0.2.21)evaluate_blockA logging host line exists for each address, with or without options after it.
DNS servers are set to your standard (replace 192.0.2.30 and 192.0.2.31)evaluate_blockEach address appears on an ip name-server line, either on one line together or on separate lines.
A login banner is set (banner login, any text; nothing to replace)must_match_regexA banner login line is present.
Every interface that is not shut down has a description (nothing to replace)evaluate_blockEvery interface block has shutdown or a non-empty description 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_regexThe hostname line matches the pattern exactly, in lower case. DUB-RTR01 and dub-rtr1 fail.
An SNMP location is set (snmp-server location, any text; nothing to replace)must_match_regexA snmp-server location line with a value is present.

Known limitations

  • The NTP, syslog and DNS rules check that each standard server is configured, not that no other server is.
  • Each address is matched as a whole, so 192.0.2.10 does not match 192.0.2.100.
  • The server rules are regular expressions: escape the dots when you replace an address, for example 192\.0\.2\.10.

Build templates

Cisco IOS build template

ios-build-template.policy · 10 rules · minimum rConfig 8.0.0 · Lab tested

Starting template for a new IOS build, not a compliance check: hostname, timezone, SSH and line access, LAN interface, DHCP, DNS, NAT, ACL, NTP and logging. Replace the example values (for example hostname MyCiscoRouter and 192.168.88.0/24) with your own before use.

Every rule uses example values, so the rules fail against the samples until they are edited.

RuleMethodWhat it checks
Description: must_match_single_string Set Hostnamemust_match_single_stringA line reads exactly hostname MyCiscoRouter.
Description: must_match_single_string Set Timezonemust_match_single_stringA line reads exactly clock timezone GMT 0.
Description: must_match_all_from_array Secure Access Settingsmust_match_all_from_arrayEach listed line appears somewhere in the config: line vty 0 4, login local, transport input ssh, logging synchronous, ip domain-name example.com and the ip ssh version, time-out and retry settings.
Description: must_match_all_from_array Configure LAN Interfacemust_match_all_from_arrayEach listed line appears somewhere in the config: interface GigabitEthernet0/0, its description, the address 192.168.88.1 255.255.255.0 and no shutdown.
Description: must_match_all_from_array DHCP Server Setupmust_match_all_from_arrayEach listed line appears somewhere in the config: the excluded range, the DHCP_POOL pool, its network, default router and DNS servers.
Description: must_match_all_from_array DNS Setupmust_match_all_from_arrayBoth ip name-server lines (8.8.8.8 and 8.8.4.4) appear in the config.
Description: must_match_single_string Enable NATmust_match_single_stringA line reads exactly ip nat inside source list 1 interface GigabitEthernet0/1 overload.
Description: must_match_all_from_array Basic Firewall Rulesmust_match_all_from_arrayEach access-list 101 entry appears somewhere in the config, as do line vty 0 4 and access-class 101 in.
Description: must_match_all_from_array Enable NTP Clientmust_match_all_from_arrayBoth ntp server lines appear in the config.
Description: must_match_all_from_array Set Up Loggingmust_match_all_from_arrayEach listed line appears in the config: buffered, console and trap logging levels and logging host 192.168.88.2.

Each line of a must_match_all_from_array body is checked on its own, as text anywhere in the config. The method does not check order or which section a line sits in.

Type to search.