举例:配置设备作为Telnet客户端登录其他设备

组网需求
如图1所示,终端PC与Device1间路由可达,Device1与Device2间路由可达。用户希望实现对远程设备Device2的管理与维护,不过终端PC与远程设备Device2间无可达路由,不能直接Telnet远程登录到Device2。用户可以通过Telnet登录到Device1,再从Device1通过Telnet登录到需要管理的设备Device2。为了防止其他非法设备通过Telnet方式登录Device2,配置ACL规则只允许Device1通过Telnet方式登录Device2。

本例中interface1代表10GE1/0/1。
配置思路
采用如下的思路配置设备作为Telnet客户端登录其他设备:
- 在Device2上配置Telnet验证方式和密码。
- 在Device2上配置ACL规则允许Device1登录。
- 从Device1上Telnet登录到Device2。
操作步骤
- 在用户视图下执行命令install feature-software WEAKEA安装弱安全算法/协议特性包(WEAKEA)。
- 配置Device2的Telnet验证方式和密码。
<HUAWEI> system-view [HUAWEI] sysname Device2 [Device2] user-interface vty 0 4 [Device2-ui-vty0-4] authentication-mode aaa [Device2-ui-vty0-4] quit
- 配置登录用户的相关信息。
[Device2] aaa [Device2-aaa] local-user admin1234 password Please configure the login password (8-128) It is recommended that the password consist of at least 2 types of characters, including lowercase letters, uppercase letters, numerals and special characters. Please enter password: Please confirm password: [Device2-aaa] local-user admin1234 service-type telnet [Device2-aaa] local-user admin1234 privilege level 3 [Device2-aaa] quit
- 在Device2上配置ACL规则允许Device1登录。
[Device2] acl 2000 [Device2-acl4-basic-2000] rule permit source 10.1.1.1 0 [Device2-acl4-basic-2000] quit [Device2] user-interface vty 0 4 [Device2-ui-vty0-4] acl 2000 inbound [Device2-ui-vty0-4] quit
采用ACL方式配置Telnet终端服务的配置为可选配置。
检查配置结果
# 完成以上配置后,仅可以从Device1上Telnet登录到Device2,无法从其他设备登录到Device2。
<HUAWEI> system-view [HUAWEI] sysname Device1 [Device1] quit <Device1> telnet 10.2.1.1 Username:admin1234 Password: Info: The max number of VTY users is 21, the number of current VTY users online is 1, and total number of terminal users online is 1. <Device2>
配置脚本
Device2的配置脚本
# sysname Device2 # acl number 2000 rule 5 permit source 10.1.1.1 0 # aaa local-user admin1234 password irreversible-cipher $1d$g8wLJ`LjL!$CyE(V{3qg5DdU:PM[6=6O$UF-.fQ,Q}>^)OBzgoU$ local-user admin1234 privilege level 3 local-user admin1234 service-type telnet # user-interface vty 0 4 acl 2000 inbound authentication-mode aaa # return
阅读剩余
版权声明:
作者:SE_YT
链接:https://www.cnesa.cn/2792.html
文章版权归作者所有,未经允许请勿转载。
THE END