Restricting VTY Access by Protocol
Problem
You want to restrict what protocols can be used to access the router’s VTY ports.
Solution
To restrict what protocols that you can use to access the routers VTY ports, use the transport input configuration command:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#line vty
Router1(config-line)#
0 4
transport input telnet
Router1(config-line)#exit
Router1(config)#end
Router1#
Discussion
Most administrators do not realize that, by default, Cisco routers will allow VTY access via other protocols besides Telnet. In some instances, intruders can bypass security measures that you have in place for Telnet and access your VTYs directly. To be safe, we recommend that you disable all unused protocols from accessing your VTYs. This will prevent anybody from gaining VTY access through one of these other protocols.
Our example shows how to restrict VTY access to Telnet only. Of course, your organization may require other protocols be included as well, such as Secure Shell (SSH). Recipe 3.20 discusses how to enable the SSH protocol and prevent all other forms of nonsecure access.
Table 3-1 lists the valid protocols that Cisco router VTYs support.
Table 3-1. VTY input transport protocols
Protocol | Description |
---|---|
all | Enables all protocols |
lat | Enables Digital LAT protocol connections |
mop | Enables Maintenance Operation Protocol (MOP) transport |
nasi | Enables NetWare Access Servers Interface (NASI) transport |
none | Disables all input ... |
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.