快捷搜索: 王者荣耀 脱发

思科路由器关联Tacacs+服务器配置命

Cisco(config)#aaa new-model //全局启动aaa 1.关联Tacacs+服务器 Cisco(config)#tacacs server s2 Cisco(config-server-tacacs)#add Cisco(config-server-tacacs)#address ipv4 10.1.1.100 Cisco(config-server-tacacs)#key abc123 2.创建Tacacs+服务器组,将Tacacs+服务器加入组中 Cisco(config)#aaa group server tacacs+ s2-tacacs Cisco(config-sg-tacacs+)#server name s2 3.Tacacs+的AAA应用部署-认证 (1)给console和enable留后门,不接受aaa管辖 Cisco(config)#aaa authentication login nos2 line none //认证时先使用line下密码认证,没配置线下认证就不认证 Cisco(config)#aaa authentication enable default enable none //enable密码,优先使用配置的enable密码,如果没有密码,就不认证 (2)在line下进行调用——命名式必须手工调用 Cisco(config)#line console 0 Cisco(config-line)#login authentication nos2 (3)vty接口下的服务启用认证(Telnet、ssh) Cisco(config)#aaa authentication login s2 group s2-tacacs local-case //认证优先使用服务器组中的aaa服务器组身份认证,如果aaa服务器无响应就使用local本地用户数据库认证 4.Tacacs+的AAA应用部署-授权 (1)基于用户权限等级的授权 Cisco(config)#aaa authorization exec s2 group s2-tacacs local (2)基于命令行的授权:基于权限等级0、1、15的命令进行授权 Cisco(config)#aaa authorization config-commands Cisco(config)#aaa authorization commands 0 s2 group s2-tacacs local Cisco(config)#aaa authorization commands 1 s2 group s2-tacacs local Cisco(config)#aaa authorization commands 15 s2 group s2-tacacs local (3)测试与aaa服务器的连通性,并在接口调用 Cisco(config)#line vty 0 4 Cisco(config-line)#login authentication s2 Cisco(config-line)#authorization exec s2 Cisco(config-line)#authorization commands 0 s2 Cisco(config-line)#authorization commands 1 s2 Cisco(config-line)#authorization commands 15 s2 Cisco(config-line)#transport input all 5.Tacacs+的AAA应用部署-审计 Cisco(config)#aaa accounting exec default start-stop group s2-tacacs //用户开始和中止exec会话的时间记录 Cisco(config)#aaa accounting connection default start-stop group s2-tacacs //用户发起外部连接的时间 Cisco(config)#aaa accounting system default start-stop group s2-tacacs //地址、数据包多少等信息记录,如Telnet、ssh等系统重启,禁用aaa等系统事件记录 Cisco(config)#aaa accounting commands 0 default start-stop group s1-tacacs Cisco(config)#aaa accounting commands 1 default start-stop group s1-tacacs Cisco(config)#aaa accounting commands 15 default start-stop group s1-tacacs

经验分享 程序员 微信小程序 职场和发展