Skip to content
Guides & References

Cisco NX-OS policy templates

The Cisco NX-OS 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 NX-OS policy templates

Policy templates for Cisco Nexus switches running NX-OS, from the nxos- files in the cisco/ folder. They check the configuration as returned by show running-config: top-level commands in column 0, sub-commands indented two spaces, and no closing !. 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 NX-OS platform pages.

Hardening definitions

NX-OS management access

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

No Telnet, SSH not disabled, an exec-timeout of 1 to 10 minutes on the VTY and console lines, and a MOTD banner.

Rule Method What it checks
Telnet is not enabled (fails on feature telnet) must_not_match_regex No line is exactly feature telnet.
SSH is not disabled (fails on no feature ssh) must_not_match_regex No line is exactly no feature ssh.
The VTY line sets an exec-timeout of 1 to 10 minutes (line vty, exec-timeout) evaluate_block The line vty block has an indented exec-timeout line with a value from 1 to 10.
The console line sets an exec-timeout of 1 to 10 minutes (line console, exec-timeout) evaluate_block The line console block has an indented exec-timeout line with a value from 1 to 10.
A MOTD banner is configured (banner motd) must_match_regex A line starts with banner motd followed by text.

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
Telnet is not enabled (fails on feature telnet) AC-17 164.312(a)(1) A.8.5
SSH is not disabled (fails on no feature ssh) AC-17 164.312(a)(1) A.8.24
The VTY line sets an exec-timeout of 1 to 10 minutes (line vty, exec-timeout) AC-3 None A.8.5
The console line sets an exec-timeout of 1 to 10 minutes (line console, exec-timeout) AC-3 None A.8.5
A MOTD banner is configured (banner motd) None None A.8.5

Known limitations

  • Telnet is off and SSH is on by default, so the rules fail on feature telnet and no feature ssh and do not require no feature telnet or feature ssh.
  • The exec-timeout default is not printed and is too long: 30 minutes in the 10.5 guide, and 0 (no timeout) on older releases. The VTY and console rules need an explicit value of 1 to 10. NX-OS takes minutes only. A switch with no line vty or line console block fails the rule.
  • A VTY access-class rule was proposed but not built, because its printed form could not be confirmed.

NX-OS AAA

pro-policy-definitions / cisco /nxos-aaa.policyView on GitHub
Kind
Hardening
Rules
4
Minimum rConfig
8.0.2
Release
v1.5.0

Login authentication and accounting through a server group, password strength checking left on, and AES encryption of stored keys.

Rule Method What it checks
Login authentication uses a TACACS+ or RADIUS server group (aaa authentication login default group …) must_match_regex A line starts with aaa authentication login default group and a group name.
AAA accounting sends to a server group (aaa accounting default group …) must_match_regex A line starts with aaa accounting default group and a group name.
Password strength checking is not disabled (fails on no password strength-check) must_not_match_regex No line is exactly no password strength-check.
AES password encryption is enabled for stored keys (feature password encryption aes) must_match_single_string The config contains feature password encryption aes.

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
AAA accounting sends to a server group (aaa accounting default group …) AU-2 164.312(b) None A.8.15
Password strength checking is not disabled (fails on no password strength-check) IA-5 None None A.5.17
AES password encryption is enabled for stored keys (feature password encryption aes) CM-6 None None A.5.17

Known limitations

  • The group rules check that a group is named, not which group or whether its servers answer.

NX-OS SNMP

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

No SNMPv1 or SNMPv2c communities, no SNMP user with MD5 authentication, and SNMP message encryption enforced for all users.

Rule Method What it checks
No SNMPv1 or SNMPv2c community is configured (line snmp-server community is absent) must_not_match_regex No line starts with snmp-server community.
No SNMP user uses MD5 authentication (fails on snmp-server user … auth md5) must_not_match_regex No snmp-server user line contains auth md5.
SNMP message encryption is enforced for all users (snmp-server globalEnforcePriv) must_match_single_string The config contains snmp-server globalEnforcePriv.

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
No SNMP user uses MD5 authentication (fails on snmp-server user … auth md5) SC-12 164.312(e)(1) A.8.5, A.8.24
SNMP message encryption is enforced for all users (snmp-server globalEnforcePriv) SC-12 164.312(e)(1) A.8.5, A.8.24

Known limitations

  • Many switches have an SNMP user for admin, created by the setup script with auth md5. The MD5 rule fails on it by design. Change that user to auth sha (or a SHA-2 option) or remove it.
  • No rule requires AES privacy on every user. AES-128 is the default privacy protocol from 10.1(1), and it is not documented whether a user created without the keyword prints priv aes-128. snmp-server globalEnforcePriv makes every user encrypt instead.

NX-OS logging

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

A remote syslog server, millisecond or microsecond log timestamps, and console logging no more verbose than critical.

Rule Method What it checks
A remote syslog server is configured (logging server) must_match_regex A line starts with logging server and an address.
Log timestamps use milliseconds or microseconds (logging timestamp milliseconds) must_match_regex A line is exactly logging timestamp milliseconds or logging timestamp microseconds.
Console logging is not more verbose than critical (fails on logging console 3 to 7) must_not_match_regex No line is logging console with a level from 3 to 7.

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 server is configured (logging server) AU-2 164.312(b) A.8.15
Log timestamps use milliseconds or microseconds (logging timestamp milliseconds) AU-3 164.312(b) A.8.15
Console logging is not more verbose than critical (fails on logging console 3 to 7) AU-6 164.312(b) None

Known limitations

  • The console rule passes when there is no logging console line at all, which is how the switch prints its default.

NX-OS services

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

CDP disabled globally, and no proxy ARP or directed broadcast on any interface.

Rule Method What it checks
CDP is disabled globally (no cdp enable) must_match_regex A line in column 0 is exactly no cdp enable.
Proxy ARP is not enabled on any interface (fails on ip proxy-arp) must_not_match_regex No indented line is ip proxy-arp or ip proxy arp.
Directed broadcast is not enabled on any interface (fails on ip directed-broadcast) must_not_match_regex No indented line starts with ip directed-broadcast.

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 ISO/IEC 27001:2022
CDP is disabled globally (no cdp enable) CM-7 A.8.9
Proxy ARP is not enabled on any interface (fails on ip proxy-arp) SC-7 A.8.20
Directed broadcast is not enabled on any interface (fails on ip directed-broadcast) SC-7 A.8.20

Known limitations

  • no cdp enable must be at column 0 to count. The same command indented under an interface is not matched.
  • A rule requiring no ip redirects on every layer 3 interface was proposed but not built, because how NX-OS prints it could not be confirmed.

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 nxos-nist-800-53.policy 17 8.3.0 NX-OS AAA, NX-OS logging, NX-OS management access, NX-OS services, NX-OS SNMP
NIST CSF 1.1 nxos-nist-csf.policy 1 8.0.0 NX-OS AAA
HIPAA Security Rule (45 CFR 164.312) nxos-hipaa.policy 10 8.0.2 NX-OS AAA, NX-OS logging, NX-OS management access, NX-OS SNMP
ISO/IEC 27001:2022 Annex A nxos-iso27001.policy 17 8.3.0 NX-OS AAA, NX-OS logging, NX-OS management access, NX-OS services, NX-OS 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

NX-OS operational standards

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

Checks drift from your own operational standard, not a hardening baseline: standard NTP and syslog servers, a MOTD banner, a hostname naming pattern and an SNMP location. Replace the example values 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 The config has an ntp server 192.0.2.10 line and an ntp server 192.0.2.11 line. Text after the address, such as use-vrf management, is allowed.
Syslog servers are set to your standard (replace 192.0.2.20 and 192.0.2.21) evaluate_block The config has a logging server 192.0.2.20 line and a logging server 192.0.2.21 line.
A MOTD banner is set (banner motd, any text; nothing to replace) must_match_regex A line starts with banner motd followed by text.
The hostname follows your naming pattern (replace the example pattern [a-z]{3}-(rtr|sw)[0-9]{2}, for example dub-sw01) 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 A line starts with snmp-server location followed by text.

Known limitations

  • The NTP and syslog rules check that each standard server is configured, not that no other server is.
  • The server rules are regular expressions: escape the dots when you replace an address, for example 192\.0\.2\.20.
  • DNS servers are not checked, because the ip name-server ... use-vrf syntax could not be confirmed in Cisco’s documentation. Interface descriptions are not checked, because whether a port with no shutdown line is up depends on system default switchport shutdown, which is set once for the switch.

Type to search.