Yeslab秦柯CCSP视频笔记-Cisco AAA详解_第1页
Yeslab秦柯CCSP视频笔记-Cisco AAA详解_第2页
Yeslab秦柯CCSP视频笔记-Cisco AAA详解_第3页
Yeslab秦柯CCSP视频笔记-Cisco AAA详解_第4页
Yeslab秦柯CCSP视频笔记-Cisco AAA详解_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 中国思科华为3COM网络技术社区Authentication:用于验证用户的访问,如login access,ppp network access等。Authorization:在Autentication成功验证后,Authorization用于限制用户可以执行什么操作,可以访问什么服务。Accouting:记录Authentication及Authorization的行为。Part I. 安全协议1Terminal Access Controller Access Control System Plus (TACACS+)Cisco私有的协议。加密整

2、个发给tacacs+ server的消息,用户的keys。支持模块化AAA,可以将不同的AAA功能分布于不同的AAA Server甚至不同的安全协议,从而可以实现不同的AAA Server/安全协议实现不同的AAA功能。配置命令:Router(config)# tacacs-server host IP_address single-connection port port_# timeout seconds key encryption_key Router(config)# tacacs-server key encryption_key 注:(1)single-connection:为R

3、outer与AAA Server的会话始终保留一条TCP链接,而不是默认的每次会话都打开/关闭TCP链接。(2)配置两个tacacs-server host命令可以实现tacacs+的冗余,如果第一个server fail了,第二个server可以接管相应的服务。第一个tacacs-server host命令指定的server为主,其它为备份。(3)配置inbound acl时需要permit tacacs+的TCP port 49。(4) 如果两个tacacs-server使用不同的key,则需要在tacacs-server host命令中指定不同的encryption_key,否则可以使用

4、tacacs-server key统一定制。但tacacs-server host命令中的key定义优先于tacacs-server key命令。Troubleshooting:命令:#show tacacs#debug tacacs 关于TACACS+的操作信息。#debug tacacs events 比debug tacacs更详细的信息,包括router上运行的 TACACS+ processes消息。Router# show tacacs Tacacs+ Server : 0/49 Socket opens: 3 Socket closes: 3 Socket abo

5、rts: 0 Socket errors: 0 Socket Timeouts: 0 Failed Connect Attempts: 0 Total Packets Sent: 42 Total Packets Recv: 41 Expected Replies: 0 No current connection2Remote Authentication Dial-In User Service (RADIUS)RADIUS是一个开放的标准,定义于RFC 2865和2865。RADIUS使用一个共享的密钥,并且只加密用户的keys,而不是TACACS+的整个AAA消息。用户的keys不会明文

6、在网络上传递。RADIUS应用范围:(1)使用multiple vendors设备,并且需要一个单独的安全协议用于AAA。(2)需要实现资源记录,如跟踪用户登录router多长时间及用户访问网络多长时间。(3)smart card authentication systems只支持RADIUS。(4)在用户初始化访问一个设备时,对他进行preauthentication。RADIUS的使用限制:(1) 不支持Apple Talks Remote Access Protocol(ARAP),the NetBIOS Frame Control Protocol(NBFCP),NetWares As

7、ynchronous Serveices Interface(NASI)及X.25 PAD链接。(2)RAIUDS不支持模块化AAA操作,即只可以使用RADIUS来完成全部的AAA操作。(3)只支持one-way authentication.不支持two-way authentication(如:两个router之间的PPP CHAP Authentication).(4)RADIUS将Authentication及Authorization功能集成为Authentication。配置命令:Router(config)# radius-server host IP_address auth-

8、port port_# acct-port port_# timeout seconds retransmit retries key key_value alias hostname | IP_address Router(config)# radius-server timeout seconds Router(config)# radius-server retransmit retries Router(config)# radius-server key key_value注:(1)RADIUS Server daemon监听Authentication消息默认使用UDP 1645.

9、Authorization消息默认使用UDP 1646.(2)配置inbound acl以permit UDP 1645/1646。(3)RFC 2026中指出,RADIUS也可能使用UDP 1812/1813,一些新的RADIUS Server同时监听UDP 1645/1646及UDP 1812/1813。所以配置router inbound acl以permit相应的端口。(4)RADIUS默认timeout为5s,retransmit为3.Troubleshooting:show radius statisticsdebug radius brief 加上brief参数功能类似于debu

10、g tacacs命令,不加则类似于debug tacacs event命令。Router# show radius statistics Auth. Acct. Both Maximum inQ length: NA NA 1 Maximum waitQ length: NA NA 1 Maximum doneQ length: NA NA 1 Total responses seen: 5 0 5 Packets with responses: 5 0 5 Packets without responses: 0 0 0 Average response delay(ms): 1880 0

11、1880 Maximum response delay(ms): 6540 0 6540 Number of Radius timeouts: 0 0 0 Duplicate ID detects: 0 0 0 3Kerberos其中TACACS+及RADIUS全面支持AAA。Kerberos只支持Authentication。ItemTACACS+RADIUSComparisonConnectionTCPUDPUDP has less overhead; however, with TCP, TACACS+ more quickly can detect a failed server an

12、d switch over to a backup. TCP can do this by having the router look for an RST (closed connection) message or by using TCP keepalives.EncryptionPayloadPasswordsTACACS+ is more secure because it encrypts the entire payload, which includes all user and AAA message information; RADIUS encrypts only pa

13、sswords, so everything else, including usernames and other account information, is sent in clear text.Authentication and authorizationSeparateCombinedRADIUS combines authentication and authorization functions, which means that you must use the same server or group for these functions. TACACS+ separa

14、tes them, giving you more control over the server that handles these functions.WAN protocolsPPP, ARAP, NetBIOS, NASI, and X.25 PADPPP and SLIPTACACS+ is better suited for remote-access situations that involve multiple dialup protocols, whereas RADIUS supports only PPP and SLIP.Router command authori

15、zationYesNoTACACS+ enables you to control what commands an authenticated user can execute on a router; RADIUS does not.AccountingBasicAdvancedThe one big advantage that RADIUS has over TACACS+ is its robust accounting, which is why many ISPs use it to monitor PPP connections.Part II. Server Grouping

16、s默认使用tacacs-server host或radius-server host命令配置的AAA Server都是按命令出现的顺序分为主/备服务器,可以使用aaa group server radius/tacacs+命令覆盖实现部分配置的host做为验证server。同时可以实现不同的aaa group实现不同的AAA功能,如group1实现Authentication,group2实现Authorization等。配置命令:Router(config)# aaa group server radius | tacacs+ group_nameRouter(config-sg)# ser

17、ver IP_address | hostname auth-port port_# acct-port port_#注:(1)不能在aaa group server中混合使用多种安全协议。Part III. Authenticationrouter支持authentication以下两种基本的访问模式。1Character mode:用户通过console, auxiliary, TTY, or VTY线路获得到router的 user或privileged EXEC访问。2Packet mode:用户通过使用 PPP, SLIP, ARAP, NASI, NetBIOS, or X.25

18、PAD等远程访问协议建立一个data-link layer链接。Method lists:指定一系列的认证方式。如group tacacs+,group radius,local,none等。每个authentication命令最多只能同时使用4种认证methods。认证的结果:Success:此method可达,且用户通过验证。Fail:此mothod可达,但用户验证失败。Error:有两种情况(1)此mothod中指定的aaa server group中的一个AAA Server不可达,第二个AAA Server被尝试。(2)此mothod指定的方式不存在,或AAA group中的所有的s

19、ervers都不可达。 注:1如果router试图访问的所有mothods结果都是unsuccessful,则router acl会自动deny以后的authentication request。2如果指定的mothod是local,且没有与用户提供的用户名相匹配的username,则验证结果为Error。Authtication Command Syntax:aaa authtication login 认证列表名称 验证方法认证列表名称default:默认的authentication认证方式。name:指定特定的认证方式列表,实现更具体的认证。验证方法enable使用enable帐号密码

20、验证group:使用Server Group验证krb5:使用kerberos V验证krb5-telnet:使用kerberos V验证telnetline:使用线路密码验证local:使用本地帐号密码验证local-case:使用本地帐号密码验证(区分大小写)none:不进行验证aaa authentication enable default 验证方法验证方法enablegrouplinenoneaaa authentication ppp 认证列表名称 验证方法认证列表名称default:默认的authentication认证方式。name:指定特定的认证方式列表,实现更具体的认证。验

21、证方法groupif-needed:如果用户已经通过tty线路身份验证,则在此不验证用户身份,直接通过krb5local-caselocalnoneAuthtication Configuration:Router(config)# aaa new-model Router(config)# aaa authentication login default | list_name method1 method2.Router(config)# aaa authentication enable default method1 method2.Router(config)# line aux |

22、 console | tty | vty start_line_# end_line_#Router(config-line)# login authentication default | list_nameRouter(config-line)# timeout login response secondsMethod KeywordDescriptionenableThe password in the enable secret or enable password commands is used to perform the authentication.lineThe line

23、password command, on the line that the user is trying to access, is used to perform authentication.localThe username commands are used to perform authentication.local-caseThe username commands are used to perform authentication. However, the username that the user enters is treated as case sensitive

24、.noneNo authentication is performed.group radiusAll configured RADIUS servers can be used to perform authentication.group tacacs+All configured TACACS+ servers can be used to perform authentication.group group_nameOnly servers in the specified aaa group server command are used to perform authenticat

25、ion.注:1aaa authentication login:User EXEC Authentication2aaa authentication enable:Privileged EXEC Authentication3timeout值为cisco router等待多长时间将此认证method认为是error。默认timeout为30s,取值范围1300s。4上图列出的methods,aaa authentication enable不支持local和local-case。Username and Password Prompts:默认用户登录时,cisco会给出这样的提示符:User

26、name: Password: 可以使用以下命令修改这些默认的提示:Router(config)# aaa authentication username-prompt prompt_string Router(config)# aaa authentication password-prompt prompt_string注:TACACS+/RADIUS Server也支持修改默认的提示符,如果同时配置aaa authentication username-prompt/password-prompt命令和TACACS+/RADIUS Server配置,则cisco优先使用TACACS+/R

27、ADIUS Server配置的prompt。Login Banners:可以使用aaa来代替默认用banner命令配置的登录提示消息:Router(config)# aaa authentication banner stop_character message stop_character 注:最多支持2996个字符。 也可以修改用户在输入无效的用户名/密码时的提示:Router(config)# aaa authentication fail-message stop_character message stop_character注:最多支持2996个字符。Login Attempts:

28、默认cisco router允许用户尝试3次登录,最后disconnect用户的链接。可以使用以下命令修改允许尝试的次数:Router(config)# aaa authentication attempts login #_of_attempts 注:1可配置的次数为125。2推荐将网络外接设备的login attempts次数修改为1,这样可以减少对密码暴力破解的机会。 Authentication Troubleshooting:Router# debug aaa authenticationPart IV. AuthorizationAuthorization Command Synt

29、ax:aaa authorization 授权类型 授权列表名称 授权方法授权类型auth-proxy:当用户成功通过authentication后,此method允许用户通过router/firewall建立到链接的其它网络的多个链接,具体的的链接数在AAA Server端配置实现。commands:限制用户可以在router上执行的命令。config-commands:限制用户可以在router上执行的配置命令。exec:限制用户到router的EXEC访问。其主要用于dialup环境,用户使用PPP的PAP/CHAP认证方式,在通过认证后通过router访问网络,此处可以限制其在通过认证

30、后,只能实现网络访问,而不能EXEC到work:当用户通过authentication并获得一个EXEC,其就可以在一个dailup接口上建立一个PPP/SLIP连接。此method用于限制此种行为。reverse-access:在通过authentication后,此method可以限制用户使用router的虚拟终端反向telnet到其它设备上。ipmobile:配置对mobile链接的授权。configuration:限制对AAA服务的配置。授权列表名称default:默认的authentication认证方式。name:指定特定的认证方式列表,实现更具体的认证。授权方

31、法groupif-authtication:如果用户通过了authentication,则允许它执行相应的操作。localnoneAuthorization Configuration:Router(config)# aaa authorization commands level_# default | list_name method1 method2. Router(config)# line aux | console | tty | vty start_line_# end_line_# Router(config-line)# authorization commands leve

32、l_# default | list_nameMethod KeywordDescriptionlocalThe username commands are used to perform authorization.noneNo authorization is performed. This parameter is typically not used.group radiusAll configured RADIUS servers can be used to perform authorization.group tacacs+All configured TACACS+ serv

33、ers can be used to perform authorization.group group_nameOnly servers in the specified aaa group server command are used to perform authorization.Configuration Mode Command Authorization:一般情况使用aaa authorization后,用户执行的每个命令都被aaa限制执行,这可能对configure termianl模式的命令有一些影响,可以使用下面命令使aaa authorization忽略对configu

34、re termianl模式的命令的限制:Router(config)# no aaa authorization config-commandsAuthorization Troubleshooting:Router# debug aaa authorizationPart V. Accounting配置accouting主要有两部分:1type of accouting:记录哪些信息。2method:将记录的信息发送到哪。Accouting Command Syntax:aaa accouting 统计类型 统计列表名称 统计记录方式 统计方法统计类型commands level:记录用户执

35、行的所有的命令,包括privilege/configuration mode命令。connection:记录router通过Telnet, LAT, TN32760, PAD, and rlogin等方式建立的到其它设备的链接信息。信息包括建立链接的用户名,日期/时间及在建立的链接上执行的命令。exec:记录router的EXEC会话信息。信息包括用户名,会话起始日期和时间,用户设备的IP。network:记录dialup链接的信息,如PPP/SLIP。信息包括相应链接的packets数目及bytes数目。resource:记录dialup链接信息及phone call的资源信息。system

36、:记录system-level事件。如接口up/down,router reload,accouting被启用/禁止。统计列表名称default:默认的authentication认证方式。name:指定特定的认证方式列表,实现更具体的认证。统计记录方式start-stop:在事件开始和结束时都建立相应的记录。先执行后记录。stop-only:只在事件结束时建立相应的记录。none:禁用对特定服务的记录。wait -start:类似于start-stop,在事件开始和结束时都建立相应的记录。不同的是此模式只在成功链接到AAA Server并能实现记录时才允许用户执行相应的事件,否则等待。即:先

37、记录后执行。(此模式在Cisco IOS 12.1及以后的版本中被移除,并不再支持)统计方法groupMethods of Accounting:RADIUSTACACS+注:1只能使用以上两种method在aaa accouting中。2Cisco的RADIUS实现不能实现aaa accouting,只能使用TACACS+。Accouting Configuration:Router(config)# aaa accounting system | network | exec | connection | commands level_# default | list_name start

38、-stop | stop-only | none method1 method2. Router(config)# line aux | console | tty | vty line_# ending_line_# Router(config-line)# accounting arap | commands level_# | connection | exec default | list_name Router(config)# interface type slot_#/port_# Router(config-if)# ppp accounting default | list_

39、nameService KeywordDescriptionsystemEnables accounting to capture system-level events, such as an interface status changing or the router reloading (only the default method list is supported for this service)networkEnables accounting for all network services, such as SLIP, PPP, NCP, and ARAPexecEnab

40、les accounting for EXEC sessions, listing what users logged in and when they logged into and out of the routerconnectionEnables accounting for outbound connections from the router, such as Telnet and TN3270commands level_#Enables accounting for commands, listing the commands (and their privilege levels) that were executed by a userresourceEnables accounting for dialup connections, list

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论