Use it when hardening a device so management is only possible from known networks.
Management ACL / VTY Protection
1. show running-config | section line vty — access-class on all ranges?
2. show access-lists <name> — your management subnet permitted?
3. Test SSH from an allowed and a non-allowed host.
4. The denied attempt increments a deny counter.
5. Keep a console session open while changing it.
ACL applied on the right interface and direction → packet compared top-down → first matching entry decides → no match = implicit deny → counter increments on the matching entry
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show lineShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
show lineShowLists console, AUX and VTY lines with their state and usage counters.
Use when: You cannot open a new SSH session, or you need to see how many VTY lines the device has.
Quick note: An asterisk in the first column marks a line in use. "show line vty 0 4" shows details for a range.
Cisco IOS / IOS XE · configuration · verifiesshow usersShowLists the active console and VTY sessions: line, user, idle time and where they connect from.
Use when: You need to know who else is logged in before a change, or VTY lines seem to be used up.
Quick note: The asterisk marks your own session. "show users all" also lists idle lines.
Cisco IOS / IOS XE · state · verifiesVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Read-only Verification Verify boundary
show access-lists 10
show running-config | section line vty
show users
Compare the applied ACL, actual source and all line ranges. Counters can be shared by multiple uses of an ACL; correlate them with a controlled test.
Step 2 Failure Signatures Narrow the fault
show line vty 0 15 | include Access— inbound ACL per line.show access-lists <name>— permit and deny counters.show running-config | section line vty— access-class on every line range.show users— current sessions and where they come from.
ReferenceWhat it is1 section · depth on demand
Direct Answer
Use a VTY access-class to restrict permitted CLI management sources. It complements SSH and AAA; it is not a forwarding ACL or an authorization policy.
ReferenceHow it works1 section · depth on demand
Technical Mechanics
Inbound VTY ACLs evaluate the arriving source. Account for jump hosts, NAT and the real management ingress path. IPv4 policy does not automatically protect IPv6. Review separate IPv6 line controls on the deployed release. A VRF-aware source policy and a routing table are different objects.
ReferenceImportant terms & boundaries4 sections · depth on demand
Official Sources
Proof Boundaries
Common mistakes
- Locking yourself out by applying the VTY ACL before allowing your own subnet.
- Using
ip access-groupon VTY lines instead ofaccess-class. - Forgetting IPv6 (
ipv6 access-class).
In depth
A management ACL protects the VTY lines by permitting SSH sessions only from approved management networks; everything else is rejected before a login prompt appears. It is applied with access-class on the lines, not with ip access-group on interfaces.
ip access-list standard MGMT-HOSTS
permit 10.0.100.0 0.0.0.255
deny any log
line vty 0 15
transport input ssh
access-class MGMT-HOSTS in vrf-also
Documented example, not captured output.
| Common mistake | Effect |
|---|---|
| Not applied to all VTY lines (0 4 vs 5 15) | Some sessions bypass the ACL |
Missing vrf-also with management VRF | Legitimate admins denied |
| No out-of-band access before testing | Risk of lock-out |
ReferenceConfiguration & state1 section · depth on demand
Cisco Configuration
State-changing default-VRF IPv4 example; 192.0.2.0/24 is a documentation-only management subnet. Check that ACL 10 is unused or already has the intended content. Keep console recovery.
access-list 10 permit 192.0.2.0 0.0.0.255
line vty 0 4
access-class 10 in
transport input ssh
The implicit deny rejects other sources. Cover every VTY range. Older VRF deployments may require access-class 10 in vrf-also; newer per-VRF forms have different semantics and must not be mixed blindly. Follow the exact platform/release guide before selecting one.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Management hosts live in 10.99.0.0/24.
ip access-list standard MGMT-ONLY
permit 10.99.0.0 0.0.0.255
deny any log
!
line vty 0 15
access-class MGMT-ONLY in
transport input sshExpected output
show ip access-lists MGMT-ONLYExpected state: Permitted logins increment the permit line; attempts from elsewhere hit the deny line.
Standard IP access list MGMT-ONLY
10 permit 10.99.0.0, wildcard bits 0.0.0.255 (42 matches)
20 deny any log (3 matches)Apply the access-class to every VTY line (0 15 or 0 4 depending on platform); a line left without it is still open. Illustrative authored output: field layout matches the tool, values will differ in your environment.Deep reference
Healthy vs suspicious evidence
Expected Output
Expected state: each intended VTY range has the reviewed access-class and SSH-only transport. An allowed source can authenticate with the intended privilege; an unauthorized source cannot establish management access.