IOS-XE management access
Rules for how people reach the device: SSH only, idle sessions closed, and a warning banner before login. They come from the ios-management-access policy template.
Every example on this page was checked with rConfig Pro's policy engine on Each of the 14 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. A card marked changed has one line edited to show a failure.
All the rules come from ios-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 templates page lists the file’s known limitations. Run the rules against show running-config.
| Rule | Method | Since |
|---|---|---|
| SSH version 2 | must_match_single_string |
8.0.0 |
| No Telnet on any line | must_not_match_regex |
8.0.2 |
| Idle timeout on every VTY line | evaluate_block |
8.3.0 |
| Idle timeout on the console | evaluate_block |
8.3.0 |
| MOTD banner | must_match_regex |
8.0.0 |
| Login banner | must_match_regex |
8.0.0 |
SSH version 2
SSH version 1 has known weaknesses and should never be offered. This rule passes when the config has the exact line ip ssh version 2. Without that line, IOS can accept both versions.
// SSH version 2 is enabled (ip ssh version 2)#[must_match_single_string]ip ssh version 2ip ssh version 2ip ssh time-out 60ip ssh authentication-retries 3ip ssh source-interface Vlan99Why: The exact line ip ssh version 2 is there.
ip ssh version 1ip ssh time-out 60ip ssh authentication-retries 3ip ssh source-interface Vlan99Why: There is no ip ssh version 2 line.
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-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_single_string). Editions: Pro, Vector, Enterprise.
No Telnet on any line
Telnet sends logins in clear text. This rule fails if any transport input line allows Telnet, either by name or with all. It uses a regex rather than a single string, so transport input telnet ssh is caught as well.
// No transport input line permits Telnet (telnet or all)#[must_not_match_regex]/^\s*transport input .*\b(telnet|all)\b/mline vty 0 4 access-class MGMT-ACCESS in vrf-also exec-timeout 5 0 logging synchronous transport input sshline vty 5 15 access-class MGMT-ACCESS in vrf-also exec-timeout 5 0 transport input sshWhy: Both VTY blocks allow SSH only.
line vty 0 4 password example-vty login local transport input telnet sshWhy: transport input telnet ssh allows Telnet next to SSH.
line vty 0 4 exec-timeout 5 0 transport input sshline vty 5 15 exec-timeout 5 0 transport input allWhy: all includes Telnet. One bad line block is enough to fail.
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 1 | fail | FAIL |
| Failing config 2 | 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 15.7 (lab) and IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
Idle timeout on every VTY line
An SSH session left open is an open door. This rule checks each line vty block on its own. A block passes with a timeout from 1 to 10 minutes, or with no exec-timeout line at all, because 10 minutes is the IOS default and is not printed.
// No VTY line block sets an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)#[evaluate_block]scope: ^line vtynot: regex: '/^\s*exec-timeout (?!(?:[1-9](?: [1-5]?[0-9])?|10(?: 0)?)\s*$)/m'line vty 0 4 access-class MGMT-ACCESS in vrf-also exec-timeout 5 0 logging synchronous transport input sshline vty 5 15 access-class MGMT-ACCESS in vrf-also exec-timeout 5 0 transport input sshWhy: Both blocks time out after 5 minutes.
line vty 0 4 login authentication default transport input sshWhy: No exec-timeout line means the 10 minute default, which is allowed.
line vty 0 4 access-class MGMT-ACCESS in vrf-also exec-timeout 15 0 logging synchronous transport input sshline vty 5 15 access-class MGMT-ACCESS in vrf-also exec-timeout 15 0 transport input sshWhy: 15 minutes is longer than 10. The result names both line vty blocks.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config 1 | pass | PASS |
| Passing config 2 | 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 15.7 (synthetic) and IOS-XE 17.9 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Idle timeout on the console
The same check for the console port, which is often forgotten because it needs physical access. exec-timeout 0 0 turns the timeout off, so a logged-in console session stays open for ever. That fails.
// The console line does not set an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)#[evaluate_block]scope: ^line connot: regex: '/^\s*exec-timeout (?!(?:[1-9](?: [1-5]?[0-9])?|10(?: 0)?)\s*$)/m'line con 0 exec-timeout 5 0 logging synchronous stopbits 1Why: The console times out after 5 minutes.
line con 0 exec-timeout 0 0 logging synchronous stopbits 1Why: 0 0 means the session never times out.
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-XE 17.9 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
MOTD banner
The message of the day is shown to everyone who connects, before login. Many teams use it for maintenance notices. This rule passes when there is a banner motd line with text after it.
// A MOTD banner is configured (banner motd)#[must_match_regex]/^banner motd .+/mbanner motd ^CScheduled maintenance window: Sundays 02:00 to 04:00.^CWhy: A banner motd line is there.
banner exec ^CManaged by the network operations team.^Cbanner login ^CAuthorised access only. All activity on this device is logged and monitored.^CWhy: There is an exec banner and a login banner, but no MOTD 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-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Login banner
A login banner tells people the device is private and that use is monitored, before they enter a password. Your legal team may want specific text. This rule only checks that a banner login line is there, not what it says.
// A login banner is configured (banner login)#[must_match_regex]/^banner login .+/mbanner login ^CAuthorised access only. All activity on this device is logged and monitored.Disconnect now if you are not an authorised user.^CWhy: A banner login line is there.
banner motd ^CScheduled maintenance window: Sundays 02:00 to 04:00.^CWhy: Only a MOTD banner. There is no banner login line.
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-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- Cisco IOS policy templates: every rule in
ios-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.