访问服务器上设置AAA的方法
- 格式:pdf
- 大小:2.46 MB
- 文档页数:3
AAA(认证、授权、计费)配置步骤:1.创建域:domain +name2.配置认证方案:authentication +?(可以同时配置radius-scheme(或TACACS+)和local认证方案,但是如果是local或none为第一方案,则不能采用其他认证方案)3.配置授权方案:authorization+?(后面参数与认证一样)4.配置计费方案:accounting+?(后面参数与上面一直)Accounting optional 计费可选Domain default enable +name 配置默认域(系统默认为system)Radius配置配置radius方案:radius scheme +name配置主备认证服务器和计费服务器:Primary authentication / accounting +ipSecondary authentication / accounting +ip配置nas-ipNas-ip +ip或radius nas-ip +ip在不配置时,系统以发送报文的出接口地址为nas-ip,在存在多个出接口的请款下建议配置nas-ip。
配置认证计费密钥Key authentication | accounting +密码配置用户名格式(默认带域名的)User-name-format(with-domain | without-domain)配置服务器类型(默认为standard)Server-type standard|extended 标准的即不带私有属性NAS可以理解为向服务器发起认证的设备,如百度移信的胖ap里的配置,nas-ip就配置成ap的管理地址记得修改默认域。
访问服务器上设置AAA的方法
陈海鸿
【期刊名称】《中国金融电脑》
【年(卷),期】2002(000)006
【摘要】@@ 网络访问的应用越来越广泛,为了向人民银行报送数据,无论是信贷登记系统、外汇管理系统还是电子联行天地对接系统,都涉及到各商业银行、金融机构的PC机或者网络与人民银行网络连接问题.
【总页数】3页(P20-22)
【作者】陈海鸿
【作者单位】中国人民银行海口中心支行
【正文语种】中文
【中图分类】TP393
【相关文献】
1.基于WCF判别内外网访问服务器的方法 [J], 杜珍星;马骏;侯爱霞
2.Android手机访问服务器的一种数据交互方法 [J], 刘平
3.新安化工在“第七届全国农药交流会”上获:“神农奖最佳海外拓展奖”和“首批信用评价AAA级企业”称号 [J],
4.在Internet上通过RDP来访问服务器 [J],
5.在Internet上通过RDP来访问服务器 [J],
因版权原因,仅展示原文概要,查看原文内容请购买。
AAA原理与配置概述 AAA是Authentication(认证)、Authorization(授权)和Accounting(计费)的简称,它提供了认证、授权、计费三种安全功能。
AAA可以通过多种协议来实现,⽬前华为设备⽀持基于RADIUS(Remote Authentication Dial-In User Service)协议或HWTACACS(Huawei Terminal Access Controller Access Control System)协议来实现AAA。
应⽤场景例如,企业总部需要对服务器的资源访问进⾏控制,只有通过认证的⽤户才能访问特定的资源,并对⽤户使⽤资源的情况进⾏记录。
NAS为⽹络接⼊服务器,负责集中收集和管理⽤户的访问请求。
AAA服务器表⽰远端的Radius 或 HWTACACS服务器,负责制定认证、授权和计费⽅案。
认证⽅式AAA有三种认证⽅式:不认证:完全信任⽤户,不对⽤户⾝份进⾏合法性检查。
本地认证:将本地⽤户信息(包括⽤户名、密码和各种属性)配置在NAS上。
缺省为本地认证。
远端认证:将⽤户信息(包括⽤户名、密码和各种属性)配置在认证服务器上。
注:如果⼀个认证⽅案采⽤多种认证⽅式,这些认证⽅式按配置顺序⽣效。
授权⽅式AAA⽀持以下三种授权⽅式:不授权:不对⽤户进⾏授权处理。
本地授权:根据NAS上配置的本地⽤户账号的相关属性进⾏授权。
远端授权: 1. HWTACACS授权,使⽤TACACS服务器对⽤户授权。
2. RADIUS授权,对通过RADIUS服务器认证的⽤户授权。
RADIUS协议的认证和授权是绑定在⼀起的,不能单独使⽤RADIUS进⾏授权。
计费⽅式AAA⽀持以下两种计费⽅式:不计费:为⽤户提供免费上⽹服务,不产⽣相关活动⽇志。
远端计费:通过RADIUS服务器或HWTACACS服务器进⾏远端计费。
AAA域 设备基于域来对⽤户进⾏管理,每个域都可以配置不同的认证、授权和计费⽅案,⽤于对该域下的⽤户进⾏认证、授权和计费。
ACS配置的几个要点:1、在接口配置拦目中选择相应的项目,否则不会在其他拦目中显示出来2、在设备端的示例ACS认证(authentication):路由器方式和PIX不同Step1>在设备端定义tacacs+服务器地址以及keytacacs-server host 202.101.110.110tacacs-server directed-requesttacacs-server key testStep2>在ACS端定义设备的IP地址Step3>在ACS上面建立用户名和用户组Step4>在设备端配置AAA认证aaa new-modelaaa authentication login default group tacacs+ localaaa authentication enable default group tacacs+ enableline vty 0 4login authentication default授权、记帐:aaa new-modelaaa authorization commands 1 default group tacacs+ local aaa authorization commands 15 default group tacacs+ local line vty 0 4authorization commands 1 defaultauthorization commands 15 defaultaaa accounting exec default start-stop group tacacs+lin vty 0 4accounting exec default如果要记录用户所用的命令,设备端配置为:aaa new-modelaaa accounting commands 0 default start-stop group tacacs+ aaa accounting commands 1 default start-stop group tacacs+ aaa accounting commands 15 default start-stop group tacacs+ line vty 0 4accounting commands 0 defaultaccounting commands 1 defaultaccounting commands 15 default一、AAA服务器配置:PIX/ASA方式Chicago(config)# username admin password ciscoChicago(config)# aaa-server mygroup protocol radiusChicago(config-aaa-server)# max-failed-attempts 4Chicago(config-aaa-server)# reactivation-mode depletion deadtime 5Chicago(config-aaa-server)# exitChicago(config)# aaa-server mygroup host 172.18.124.11Chicago(config-aaa-server)# retry-interval 3Chicago(config-aaa-server)# timeout 30Chicago(config-aaa-server)# key cisco123Chicago(config-aaa-server)# exitshow running-config aaa-server (显示配置的命令)show aaa-server(显示包括本地数据库在内的AAA服务器详细情况)clear aaa-server statistics [tag [host hostname]]clear aaa-server statistics protocol server-protocolclear configure aaa-server [server-tag]二、配置管理会话的认证:Chicago(config)# aaa authentication telnet console mygroup LOCALChicago(config)# aaa authentication ssh console mygroupChicago(config)# aaa authentication serial console mygroup(物理CONSOLE口)aaa authentication http console mygroupIf this command is not configured, Cisco ASDM users can gain access to the A SA by entering only the enable password, and no username, at the authentica tion prompt三、配置访问AAA:access-list 150 extended permit ip any anyaccess-list 150 extended deny ip host 172.18.124.20 anyaaa authentication match 150 inside mygrouptimeout uauth hh:mm:ss [absolute | inactivity]It is recommended to configure the absolute timeout command value for at le ast 2 minutes. Never configure the timeout uauth duration to 0auth-prompt [prompt | accept | reject] prompt textaccess-list 100 extended permit ip 10.10.10.0 255.255.255.0 192.168.1.0 255. 255.255.0aaa authorization match 100 inside mygroupaaa authorization command {LOCAL | tacacs_server_tag [LOCAL]}access-group 100 in interface inside per-user-overrideChicago(config)# aaa accounting match 100 inside mygroupChicago(config)# aaa accounting command privilege 15 mygroup 对特权级别15的用户记帐Deploying Cut-Through Proxy Authenticationaccess-list 100 extended permit ip any anyaaa authentication match 100 inside LOCAL实验配置示例:pix525(config)# sh runPIX Version 7.2(1)!hostname pix525domain-name enable password 2KFQnbNIdI.2KYOU encryptednamesname 192.168.10.2 insidehostname 172.16.16.2 bastionhost!interface Ethernet0nameif insidesecurity-level 100ip address 192.168.10.1 255.255.255.0!interface Ethernet1nameif outsidesecurity-level 0ip address 192.1.1.1 255.255.255.0!interface Ethernet2nameif dmzsecurity-level 50ip address 172.16.16.1 255.255.255.0!passwd 5ya5JKHLgY0ZD3KU encrypted TELNET密码access-list 101 extended permit icmp any anyaccess-list 101 extended permit tcp any anyaccess-list aaaacl2 extended permit ip 192.168.10.0 255.255.255.0 any access-list dmzin extended permit ip any host bastionhostglobal (outside) 1 interfaceglobal (dmz) 1 172.16.16.10-172.16.16.20 netmask 255.255.255.0nat (inside) 1 192.168.10.0 255.255.255.0nat (inside) 1 192.168.20.0 255.255.255.0nat (dmz) 1 172.16.16.0 255.255.255.0access-group 101 in interface outsideaccess-group 101 in interface insideaccess-group 101 in interface dmzroute outside 0.0.0.0 0.0.0.0 192.1.1.2 1route inside 192.168.20.0 255.255.255.0 insidehost 1aaa-server配置完成两项:指定协议和AAA服务器地址、KEYaaa-server deng protocol radiusreactivation-mode timedmax-failed-attempts 4aaa-server deng host 192.168.20.206timeout 300key deng本地数据库username dengzhaopeng password nuvFZK3pqSfYnWqN encryptedusername dengyusu password 6SGxhdEZqnTFVjew encryptedaaa authentication telnet console LOCAL 用本地数据库对管理会话做认证aaa authentication match aaaacl2 inside deng 用AAA服务器对指定的网段访问做认证aaa authentication match dmzin inside deng 用AAA服务器对堡垒主机的访问做认证telnet insidehost 255.255.255.255 insidetelnet timeout 5ssh scopy enable 允许SSH访问类似FTP功能,但是进行加密文件传输ssh 192.1.1.2 255.255.255.255 outsidessh insidehost 255.255.255.255 insidessh timeout 5ssh version 2先产生密钥对(SHOW RUN中不显示?),调用域名console timeout 0pix525(config)# sh aaa-sServer Group: dengServer Protocol: radiusServer Address: 192.168.10.206Server port: 1645(authentication), 1646(accounting)Server status: ACTIVE, Last transaction at 13:45:25 UTC Sun Dec 16 2007 Number of pending requests 0Average round trip time 117msNumber of authentication requests 4Number of authorization requests 0Number of accounting requests 0Number of retransmissions 0Number of accepts 1Number of rejects 3Number of challenges 0Number of malformed responses 0Number of bad authenticators 0Number of timeouts 0Number of unrecognized responses 0pix525(config)# sh uauCurrent Most SeenAuthenticated Users 1 1Authen In Progress 0 1user 'dengyusu' at insidehost, authenticated (idle for 0:00:07)absolute timeout: 0:05:00inactivity timeout: 0:00:00pix525(config)# clear uaupix525(config)# sh uauCurrent Most SeenAuthenticated Users 0 1Authen In Progress 0 1重点:最小化配置ACS4.1上此例的配置:1、只需要指定NAS,不需要指定ACS-SERVER。
Radius访问AAA服务器实验
一、实验目的:远程登录路由器时,通过Radius访问AAA服务器,进行用户验证。
二、实验步骤
1.普通远程登录服务器
(1)在路由器上进行如下配置
Router(config)#username user1 password 123 在本地数据库中定义用户名,口令
Router(config)#line vty 0 4 进入vty
Router(config-line)login local 要求登录,使用本地数据库验证(2)在主机上测试:
2.使用radius访问AAA服务器,远程登录服务器
(1)radius服务器设置
(2)路由器的配置
Router(config)#aaa new-model 采用AAA认证Router(config)#aaa authentication login default group radius enable 使用Radius服务器认证login
Router(config)#radius-server host 192.168.1.2 指定radius服务器Router(config)#radius-server key abc 设置和radius服务器的共享密钥
Router(config)#line vty 0 4
Router(config-line)#no login local
Router(config-line)#login default
(3)主机Telnet到路由器,输入在Radius服务器上设置的用户名和密码。
AAA配置实例+注解cisco上配置AAA,AAA是指用使用Authentication、Authorization、Accounting三种功能对要管理交换机的用户做控制。
Authentication(认证):对用户的身份进行认证,决定是否允许此用户访问网络设备。
Authorization(授权):针对用户的不同身份,分配不同的权限,限制每个用户的操作Accounting(计费):对每个用户的操作进行审计和计费我们一般使用TACACS+、RADIUS协议来做cisco设备的AAA。
RADIUS是标准的协议,很多厂商都支持。
TACACS+是cisco私有的协议,私有意味只有cisco可以使用,TACACS+增加了一些额外的功能。
当用户的身份被认证服务器确认后,用户在能管理交换机或者才能访问网络;在访问设备的时候,我们可以针对这个用户授权,限制用户的行为;最后我们将记录用在设备的进行的操作。
在认证的时候,有一下这些方法:1.在交换机本地进行用户名和密码的设定,也就是在用户登录交换机的收,交换机会对比自己的本地数据库,查看要登录的用户所使用的用户名和密码的正确性。
2.使用一台或多台(组)外部RADIUS服务器认证3.使用一台或多台(组)外部TACACS+服务器认证用一个配置实例,说明交换机上操作username root secret cisco#在交换机本地设置一个用户,用户名是root,密码是cisco。
aaa new-model#在交换机上激活AAAaaa authentication login default group tacacs+local#设置一个登录交换机是认证的顺序,先到tacacs+服务器认证,如果tacacs+服务器出现了故障,不能使用tacacs+认证,我们可以使用交换机的本地数据库认证,也就是用户名root密码ciscoaaa authorization exec default group tacacs+if-authenticated#如果用户通过了认证,那么用户就能获得服务器的允许,运行交换机的EXEC对话aaa authorization commands15default group tacacs+local#在任何权限在使用交换机命令式都要得到tacacs+服务器许可,如果tacacs+出现故障,则要通过本地数据库许可aaa accounting exec default start-stop group tacacs+#记录用户进去EXEC对话的认证信息、用户的地址和对话的开始时间持续时间,记录的过程是从开始到结束aaa accounting commands1default start-stop group tacacs+ aaa accounting commands15default start-stop group tacacs+!tacacs-server host192.168.1.1#定义tacacs服务器地址是192.168.1.1tacacs-server key cisco#定义交换机和tacacs服务器之间通信中使用的key为ciscoline vty04login authentication defaultauthorization exec defaultaccounting exec default最近在搭建公司的ACS,总结了一些经验写在这里。
华为交换机aaa配置命令是什么交换机具有性能价格比高、高度灵活、相对简单、易于实现等特点。
所以,以太网技术已成为当今最重要的一种局域网组网技术,网络交换机也就成为了最普及的交换机。
下面是店铺给大家整理的一些有关华为交换机aaa配置命令,希望对大家有帮助!华为交换机aaa配置命令[Huawei]aaa[Huawei-aaa]authentication-scheme ren_zheng 配置AAA认证方案名为ren_zheng[Huawei-aaa-authen-aaa]authentication-mode radius local 配置AAA认证模式为先Radius,如无响应则本地认证[Huawei-aaa-authen-aaa]quit[Huawei-aaa]accounting-scheme ji_fei 配置AAA计费方案名为ji_fei[Huawei-aaa-accounting-ji_fei]accounting-mode radius 配置AAA计费模式为Radius服务器计费[Huawei-aaa-accounting-ji_fei]accounting start-fail offline 配置当开始计费失败时,将用户离线[Huawei-aaa-accounting-ji_fei]quit二、配置Radius模板[Huawei]radius-server template huawei_use 配置Raduis模板名为huawei_use[Huawei-radius-huawei_use]radius-server authentication 192.168.1.254 1812 主radius认证服务地址和端口[Huawei-radius-huawei_use]radius-server authentication 192.168.1.253 1812 secondary 备用认证服务器[Huawei-radius-huawei_use]radius-server accounting 192.168.1.253 1812 主radius计费服务地址和端口[Huawei-radius-huawei_use]radius-server accounting192.168.1.253 1813 secondary 备用计费服务器[Huawei-radius-huawei_use]radius-server shared-key cipher hello 配置设备与Radius通信的共享秘钥为hello[Huawei-radius-huawei_use]radius-server retransmit 2 timeout 5 配置设备向Radius服务器发送请求报文的超时重传次数为2s,间隔为5s[Huawei-radius-huawei_use]quit三、在AAA用户域绑定要使用的AAA认证和Radius模板[Huawei]aaa[Huawei-aaa]domain huawei 配置AAA域,名称huawei[Huawei-aaa-domain-huawei]authentication-schemeren_zheng 在域中绑定AAA认证方案[Huawei-aaa-domain-huawei]accounting-scheme ji_fei 在域中绑定AAA计费方案[Huawei-aaa-domain-huawei]radius-server huawei_use 在域中绑定Radius模板[Huawei-aaa-domain-huawei]quit检查命令:[Huawei]display radius-server configuration template huawei_use------------------------------------------------------------------------------Server-template-name : huawei_useProtocol-version : standardTraffic-unit : BShared-secret-key : aaYOZ$V^P35NZPO3JBXBHA!!Timeout-interval(in second) : 5Primary-authentication-server : 192.168.1.254 :1812 :-LoopBack:NULL Source-IP:0.0.0.0Primary-accounting-server : 192.168.1.254 :1813 :-LoopBack:NULL Source-IP:0.0.0.0Secondary-authentication-server : 192.168.1.253 :1812 :-LoopBack:NULL Source-IP:0.0.0.0Secondary-accounting-server : 192.168.1.253 :1813 :-LoopBack:NULL Source-IP:0.0.0.0Retransmission : 2Domain-included : YESNAS-IP-Address : 0.0.0.0Calling-station-id MAC-format : xxxx-xxxx-xxxx------------------------------------------------------------------------------[Huawei][Huawei]display domain name huaweiDomain-name : huaweiDomain-state : ActiveAuthentication-scheme-name : ren_zhengAccounting-scheme-name : ji_feiAuthorization-scheme-name : -Service-scheme-name : -RADIUS-server-template : huawei_useHWTACACS-server-template : -[Huawei]session 2 AAA+HWTACACS进行认证、授权、计费(默认所有使用TCP端口49)拓扑不变HWTACACS(Huawei Terminal Access Controller Access Control System)协议是华为对TACACS进行了扩展的协议HWTACACS是在TACACS(RFC1492)基础上进行了功能增强的一种安全协议。
实验二配置用户通过AAA方式登录交换机示例配置通过AAA方式登录交换机的示例。
在本示例中,通过配置VTY0的优先级、断开连接的时间以及打开本地用户的闲置切断开关等操作,实现使用AAA方式登录交换机。
组网需求PC机的COM口与交换机的Console口相连。
配置VTY0的优先级为2,对从VTY0登录的用户进行AAA验证,用户登录时需要输入用户名“huawei”,密码“huawei”。
登录后,如果用户超过30分钟未对交换机进行操作,将断开与交换机的连接。
配置思路采用如下的思路配置登录交换机:1.进入用户接口视图,配置VTY0的优先级为2和断开连接的时间。
2.进入AAA视图,配置用户名、密码和用户等级。
3.在AAA视图下打开本地用户的闲置切断开关。
数据准备为完成此配置例,需准备如下的数据:∙验证时需要的用户名和密码∙断开连接的时间操作步骤1.交换机上配置VTY0的优先级为2,验证方式为aaa,断开连接时间为30分钟。
<Quidway> system-view[Quidway] user-interface vty0[Quidway-ui-vty0] user privilege level2[Quidway-ui-vty0] authentication-mode aaa[Quidway-ui-vty0] idle-timeout 30[Quidway-ui-vty0] quit2.配置用户名、密码和用户等级。
[Quidway] aaa[Quidway-aaa] local-user huawei password cipher huawei[Quidway-aaa] local-user huawei privilege level 2配置文件#sysname Quidway#aaalocal-user huawei password cipher N`C55QK<`=/Q=^Q`MAF4<1!!local-user huawei privilege level 2#authorization-scheme default#accounting-scheme default#domain default#user-interface vty 0authentication-mode aaauser privilege level 2idle-timeout 30#return。
AAA服务器的配置第一步:启用线下保护【重要提示】在被网管设备启用AAA认证时,一定要给自己预留“后门”,即线下保护,保障Console/AUX不受影响(1.网络问题 2.配置问题),始终可以登录1、启用AAADMZ(config)#aaa new-model2、配置线下保护策略DMZ(config)#aaa authentication login xhacs line none命令解释:login (登陆)需要认证策略名为 xhacs策略为先使用线下密码认证(line)如果线下没有密码就不认证(none)3、调用线下保护策略DMZ(config)#line console 0DMZ(config-line)#login authentication xhacsDMZ(config)#line aux 0DMZ(config-line)#login authentication xhacs第二步:指定AAA服务器、认证协议、及与AAA服务器通讯使用的密码DMZ(config)#tacacs-server host 172.16.123.199 key cisco(或 raidus-server host 172.16.123.199 key cisco)第三步:在AAA服务器上添加网络(认证)设备-AAA Client第四步:在AAA服务器上创建用户第五步:测试与AAA服务器的通讯注意:1)、时间保持一致2)、实验环境别受本机防火墙影响设置时间:第六步:应用--在VTY线路下启用AAA认证DMZ(config)#aaa authentication login vtypolicy group ?WORD Server-group nameradius Use list of all Radius hosts.tacacs+ Use list of all Tacacs+ hosts.DMZ(config)#aaa authentication login vtypolicy group tacacs+ local DMZ(config)#line vty 0 4DMZ(config-line)#login authentication vtypolicy。
在思科路由器上配置AAA认证在思科路由器上配置AAA认证⼀、实验拓扑⼆、地址表三、AAA配置过程1.在R1配置本地⽤户名并为console配置本地AAA认证和VTY连接认证R1(config)#username admin1 password admin1R1(config)# aaa new-modelR1(config)#aaa authentication login default localR1(config)#line console 0R1(config-line)#login authentication default验证⽤户EXEC登⼊使⽤本地数据库------VTY连接认证R1(config)# aaa authentication login telnet-login localR1(config)# line vty 0 4R1(config-line)# login authentication telnet-login验证Telnet配置。
让PC-Aping通R12.在R2进⾏有关TACACS+服务器的详细配置R2(config)#username admin2 password admin2R2(config)#tacacs-server host 192.168.2.2R2(config)#tacacs-server key admin2R2(config)#aaa new-modelR2(config)#aaa authentication login default group tacacs+ localR2(config)#line console 0R2(config-line)#login authentication defaultTACACS+服务器配置⽤AAA TACACS+服务器验证⽤户EXEC的登⼊3.在R3⽤RADIUS配置基于服务器的AAA认证R3(config)#username admin3 password admin3R3(config)#tacacs-server host 192.168.3.2R3(config)#tacacs-server key admin3R3(config)#aaa new-modelR3(config)#aaa authentication login default group radius local R3(config)#line console 0R3(config-line)#login authentication defaultRADIUS服务器配置四、⽹络测试1.PC-A ping PC-B2.PC-A ping PC-C3.PC-C ping PC-B。
AAA认证一、准备条件1.1windows 虚拟机一台1.2路由器一台(我采用的是CISCO3600)1.3要求windows虚拟机与真机进行连通1.4拓扑如下二、基本配置2.1 WinRadius服务器基本配置第一步、登陆windows 虚拟机,配置IP地址为:192.168.1.7第二步、打开“WinRadius”软件,并解压缩第三步、在解压缩的文件里,打开“”服务,出现如下图所示:“加载账户数据失败”第四步、点击《设置——数据库》出现下图,在点击图中的《自动配置ODBC》第五步、根据上图日志提示:重新启动“WinRadius”服务,服务器启动正常第六步、点击《设置——系统》出现下图,确定认证端口:1812,计费端口:1813第七步、点击《设置——多重密钥》出现下图,其中对于IP[NAS]填写:AAA路由器与交换机的管理地址,采用密钥填写:交换机、路由器与WinRadius服务器之间的认证密钥。
在此,我以路由器192.168.1.1,密钥为123 为例。
最后点击“添加”。
第八步、点击《操作——添加账号》。
此处以用户名:wang ,口令为:wang第九步、查看新增加的账号:wang 《操作——查询——查用户信息》2.2 路由器基本配置首先、对路由器的接口F0/0配置IP地址并激活该端口Router#sh run inter f0/0Building configuration...Current configuration : 96 bytes!interface FastEthernet0/0ip address 192.168.1.1 255.255.255.0duplex autospeed autoendRouter#其次、测试路由器与WinRadius服务器之间的网络是否正常通讯Router#ping 192.168.1.7Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.7, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/14/36 ms Router#最后、测试路由器与客户机(telnet该路由器的客户端)能否正常通讯Router#ping 192.168.1.8Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.8, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/12/48 msRouter#三、AAA认证配置Router(config)#aaa new-model (启用AAA认证)Router(config)#username xiong password xiong (创建本地用户与口令)aaa authentication login haha group radius local (先进行radius服务器认证,在radius 服务器不可达时,采用本地认证)aaa authentication login hehe none (登陆不进行认证)no radius-server host 192.168.1.7 auth-port 1645 acct-port 1646 (关闭默认的认证、授权端口与审计端口)radius-server host 192.168.1.7 auth-port 1812 acct-port 1813 key 123 (改写通用的认证、授权端口与审计端口,同时配置路由器与radius服务器之间的口令123)Router(config)#line vty 0 4Router(config-line)#login authentication haha (当用户telnet该路由器时,调用认证haha进行认证)Router(config-line)#exitRouter(config)#line con 0Router(config-line)#login authentication hehe (当用户con该路由器时,调用认证heh 进行认证)Router(config-line)#end路由器具体配置如下:Router#sh runBuilding configuration...Current configuration : 720 bytes!version 12.4service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname Router!boot-start-markerboot-end-marker!!aaa new-model!aaa authentication login haha group radius localaaa authentication login hehe none!aaa session-id commonmemory-size iomem 5!!ip cef!!username xiong password 0 xiong!!!!interface FastEthernet0/0ip address 192.168.1.1 255.255.255.0duplex autospeed auto!ip http server!radius-server host 192.168.1.7 auth-port 1812 acct-port 1813 key 123 !control-plane!!line con 0login authentication heheline aux 0line vty 0 4login authentication haha!!endRouter#Router#sh runBuilding configuration...Current configuration : 720 bytes!version 12.4service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname Router!boot-start-markerboot-end-marker!aaa new-model!!aaa authentication login haha group radius localaaa authentication login hehe none!aaa session-id commonmemory-size iomem 5!!ip cef!username xiong password 0 xiong!interface FastEthernet0/0ip address 192.168.1.1 255.255.255.0duplex autospeed auto!ip http server!radius-server host 192.168.1.7 auth-port 1812 acct-port 1813 key 123 !control-plane!line con 0login authentication heheline aux 0line vty 0 4login authentication haha!!endRouter#四、测试4.1 用客户机telnet该路由器成功(用radius服务器的用户wang进行验证)同时在WinRadius服务器上查看相应的日志4.2 当WinRadius服务器出现异常,我们在用“wang”登陆时,就失败了,同时,只能采用本地账户“xiong”登陆来进行管理该路由器路由器PING不同WinRadius服务器客户机用wang登陆失败采用本地xiong登陆成功五、用密文进行认证Router(config)#enable secret 123456用sh run 查看刚配置的口令enable secret 5 $1$cGdg$Um3fHK8td9KRSKAG.5Lst.把上面记录好的密钥口令保存好,同时要记住它所对应的明文口令在路由器上修改与服务器之间的认证:Router(config)#radius-server host 192.168.1.7 auth-port 1812 acct-port 1813 key $1$cGdg$Um3fHK8td9KRSKAG.5Lst.最后,一样正常登陆采用同样的方式对服务器上用户wang的密码进行更换成密文的口令(只要确定在20个字符以内)。
AAA原理及配置AAA是Authentication(认证)、Authorization(授权)和Accounting(计费)的简称,它提供了认证、授权、计费三种安全功能。
⽀持的认证⽅式:不认证,本地认证,远端认证⽀持的授权⽅式:不授权,本地授权,远端授权⽀持的授权⽅式:不计费,远端计费如果⼀个认证⽅案采⽤多种认证⽅式,这些认证⽅式按配置顺序⽣效user privilege level 0 1 2 3⼏个级别的区别level 0参观ping、tracert、telnet、rsh、super、language-mode、display、quitlevel 1监控0级命令、msdp-tracert、mtracert、reboot、reset、send、terminal、undo、upgrade、debugginglevel 2系统所有配置命令(管理级的命令除外)和0、1级命令level 3管理所有命令1.远程管理⽹络设备的两种验证⽅式:telnet(不安全)、SSH/stelent⾸先得开启Telent功能:telnet server enable2.配置 Telnet ⽅式登录时的密码:[Huawei] user-interface vty 0 4 //进⼊0-4个终端[Huawei-ui-vty0-4] authentication-mode password/aaa //启⽤密码验证或AAA验证[Huawei-ui-vty0-4] set authentication password simple/cipher xxxx //以明⽂或密⽂⽅式加密(交换机)[Huawei-ui-vty0-4] set authentication password cipher xxxx //此为路由器配置命令,路由器只能是密⽂加密[Huawei-ui-vty0-4]protocol inbound telnet//设置哪些服务可以通过此test⽤户进⾏验证,设置telnet 服务[Huawei-ui-vty0-4] user privilege level 3 //设置当前⽤户权限级别3.配置 Telnet以⽤户名+密码⽅式登录时的密码:进⼊AAA模式命令⾏下:[Huawei]aaa[Huawei-aaa]local-user huawei level 3 password cipher xxxx //添加新⽤户为:huawei 密码为:xxxx 加密模式为:cipher 密⽂加密,⽤户级别为3[Huawei-aaa]local-user huawei service-type http ssh telnet web //在⽤户huawei下设置登录允许使⽤的协议[Huawei-aaa]local-user huawei privilege level 3 //远程登录时能够使⽤的级别命令路由器以telnet⽅式访问路由器:<Huawei>telnet xxxxx4.以SSH⽅式实现加密的远程连接[Huawei]aaa[Huawei-aaa]local-user xxxx password cipher xxxx privilege level 3 //配置本地⽤户[Huawei-aaa]local-user xxxx service-type ssh[Huawei]ssh user xxxx authentication-type password //添加ssh⽤户名和密码[Huawei]stelnet server enable //开启stelnet服务[Huawei]rsa local-key-pair create //⽣成密钥对信息[Huawei]user-interface vty 0 4 //进⼊虚拟⽤户界⾯端⼝0-4[Huawei-ui-vty0-4]authentication-mode aaa[Huawei-ui-vty0-4]protocol inbound ssh //配置允许登录接⼊⽤户类型的协议客户端CRT远程连接即可路由器以ssh⽅式连接路由器:[Huawei]ssh client first-time enable //⽤来使能SSH客户端⾸次认证[Huawei]stelnet xxxxx5.配置 Console ⽅式登录时的密码:[Huawei]user-interface console 0 //进⼊控制接⼝console只有0[Huawei-ui-console0]authentication-mode password //设置console登录验证⽅式为密码⽅式[Huawei-ui-console0]set authentication password simple xxxx //simple设置明⽂密码,cipher为密⽂密码[Huawei-ui-console0]user privilege level 3 //指定console连接的⽤户级别⽤户级别为0-15,0、1、2分别对应命令级别的0、1、2。
AAA介绍:1、认证:确认你是谁,是不是一个合法的用户,我是否应该为你提供服务。
2、授权指派这个用户能够访问什么样的资源,就是说你是我们公司内部的用户,但你只是一个普通的CCNP学员,你可能就被限制只能看CCNP相关的视频资料,另的都不能访问3、审计我对你的行为,什么时候来,什么时候去,使用了什么样的资源,登陆了什么设备,干了什么事情,都要作记录,这叫审计基本AAA的配置:1、激活AAA2、配置RADIUS 服务器3、配置认证方式4、应用方式一接口AAA配置部署基本配置部署R1(config)#int f0/0R1(config-if)#ip address 10.1.1.1 255.255.255.0R1(config-if)#no shR2(config)#int f0/0R2(config-if)#ip address 10.1.1.2 255.255.255.0R2(config-if)#no shSW(config)#vlan 2SW(config-vlan)#name TestVLAN2SW(config-vlan)#exitSW(config)int range f0/1 , f0/2SW(config-if-range)#switchport mode accessSW(config-if-range)#switchport accesss vlan 2SW(config-if-range)#endSW(config)#int f0/16SW(config-if)#no switchportSW(config-if)#ip address 150.1.45.1 255.255.255.0SW#ping 150.1.45.241SW(config)#username admin password cisco //本地创建用户名和密码SW(config)#aaa new-model //启用AAA功能SW(config)#radius-server host 150.1.45.241 key cisco //在客户端指定了RADIUS服务器说明:RADIUS有两套端口号:一组是1645-1646,另一组是1812-1813下面我们在AAA服务器上指客户端(交换机)Network Configration——Add Entry(AAA Clients)——SW(AAA Client Hostname)——150.1.45.1(AAA Client IP Address)——cisco(key)——RADIUS(CISCO IOS/PIX6.0)[Authenticate Using]——Submit+Apply创建一个用户User Setup——User:acsuser——Add/Edit——Password:cisco——submit下面我们在交换机上作测试SW#test aaa group radius accuser cisco new-code //这就表示测试成功了,表示Radius和交换机通信是OK的SW(config0##aaa authentication login noacs none //AAA登陆的认证策略,这个认证策略的名字叫noacs 策略的内容是无认证。
防火墙AAA的配置asa(config)# aaa-server [aaa服务器的名子] protocol [radius/tacacs+]指明AAA服务器的名子和使用的协议asa(config)# aaa-server [aaa服务器的名子] [连接server的接口名] host [server的IP地址] key [密钥] 指明AAA服务器所在的地址和keyasa(config)# aaa authentication [要验证的协议] console [aaa服务器的名子]配置AAA要验证的协议和使用哪一个服务器做验证,需要验证的协议有enable 对enable验证serial 对线路口验证sshtelnet 对telnet的验证流量验证,用ACL定义需要验证的流量asa(config)# aaa authentication match [acl] [outside] [aaa服务器的名子]来自外部接口的流量,如果匹配ACL做验证,不匹配不做验证直接通过。
代理验证的配置如果协议本身无法做验证,使用virtual做代理验证。
virtual telnet [192.168.0.9] IP为防火墙的IP或同网段的。
例:include和exclude的使用方法aaa authentication include包含要求验证/exclude不要求验证例:aaa authentication include [ftp] [outside] [源IP] [mask] [目的] [name]来自外部接口的ftp流量都需要找aaa-server验证asa(config)# aaa local authentication attempts max-fail [3] 最大失效尝试次数验证代理超时时间的设置asa(config)# timeout uauth 0:10:10 inactivity 非活跃超时时间asa(config)# timeout uauth 0:10:10 absolute 绝对超时时间AAA的授权的配置asa(config)# aaa authorization match [acl] [inside] [aaa]匹配ACL,来自内部接口的流量交给名子为aaa的AAA服务品做授权AAA的审计的配置asa(config)# aaa accounting match acl inside aaa匹配ACL,来自内部接口的流量交给名子为aaa的AAA服务品做审计。
第46章AAA配置本章主要描述如何在路由器上进行AAA的配置。
AAA是认证、授权和统计(Authentication, Authorization and Accounting)的简称。
它是运行于网络访问服务器(NAS)上的客户端程序。
它提供了一个用来对认证、授权和统计这三种安全功能进行配置的一致性框架。
本章主要内容:●配置AAA相关命令描述●AAA配置示例●AAA调试46.1AAA基本配置命令1.命令描述前带“*”符号的表示该命令有配置实例详细说明。
2.配置模式指可以执行该配置命令的模式,如:config、config-if-××(接口名)、config-××(协议名称)等。
46.2AAA相关命令描述⏹aaa new-model在路由器上启动AAA功能。
本命令的no形式用来关闭AAA。
aaa new-modelno aaa new-model【缺省情况】不启动AAA。
【命令模式】全局配置模式。
⏹aaa authentication banner修改当用户登录到路由器上时显示的欢迎信息。
本命令的no形式恢复缺省欢迎信息。
aaa authentication banner bannerno aaa authentication banner语法描述banner 登录到路由器上时显示的欢迎信息。
欢迎信息头尾用相同的字符作为头尾表示符。
如:希望输出的欢迎信息显示为“welcome”,则输入的banner为“^welcome^”。
“^”即是首尾标示符。
【缺省情况】缺省欢迎信息为“User Access Verification”。
【命令模式】全局配置模式。
⏹aaa authentication fail-message修改当用户登录失败时的提示信息。
本命令的no形式恢复缺省提示信息。
aaa authentication fail-message fail-messageno aaa authentication fail-message语法描述fail-message 用户登录失败时的提示信息。
在如今高度互联的世界中,域名系统(Domain Name System,简称DNS)扮演着至关重要的角色。
DNS不仅仅是一个将网址转换为IP地址的工具,还提供了其他一些功能,其中之一就是AAA记录的使用与配置。
AAA记录是DNS中的一种资源记录,它用于将域名与IPv6地址进行关联。
与IPv4地址记录(即A记录)不同,AAA记录为互联网上的每个设备提供唯一的IPv6地址,支持更大规模的网络通信。
接下来,本文将探讨AAA记录的使用与配置,以及其对网络的影响。
首先,我们需要讨论如何正确地配置AAA记录。
配置AAA记录并不复杂,但仍需要一些基本的知识。
要配置AAA记录,您需要访问您域名的DNS管理界面,通常由您的域名注册商提供。
在DNS管理界面中,您将找到一个名为"AAA记录"或"IPv6记录"的选项。
点击进入该选项后,您将看到一个表格,需要填写域名和IPv6地址。
填写完成后,保存更改并等待一段时间,一般情况下,更改会在几分钟内生效。
在配置AAA记录时,有几个关键的方面需要注意。
首先,您需要确保您的IPv6地址是有效的且与相关域名正确匹配。
如果您不确定如何获得有效的IPv6地址,建议您咨询您的网络服务提供商。
其次,您需要检查您的AAA记录是否与其他记录相互冲突,例如A记录或CNAME 记录。
在配置AAA记录时,确保避免任何潜在的冲突,以免影响网络通信的正常运行。
一旦您正确地配置了AAA记录,它将为您的网络带来一系列好处。
首先,AAA记录使您的网络对IPv6的支持更加完善。
IPv6是下一代互联网协议,具有更大的IP地址空间和更好的安全性。
通过配置AAA记录,您的网络将能够充分利用IPv6的优势,并为用户提供更好的互联网体验。
其次,AAA记录也为您的网络提供了更高的安全性。
IPv6地址由128位组成,相对于IPv4的32位地址,可以提供更多的地址组合。
这意味着更难被攻击者猜测或扫描到。