| 0 comments ]

Configuring AAA on a Cisco Router Using the Local Database

Add a note hereAAA is widely supported in Cisco IOS Software as an additional security service available for securing access to network devices and networks. One of the options you have when configuring your network to work with AAA is to use a local username and password database to provide security greater than a simple password. It is likely that smaller organizations will configure AAA to operate locally.

Add a note here Authentication, Authorization, and Accounting

Add a note hereAccess control is the way you control who is allowed access to the access server or router and which services they are allowed to use once they have access. AAA network security services provide the primary framework through which you set up access control on your router. AAA services provide a higher degree of scalability than the line-level and privileged EXEC authentication commands alone.

Add a note hereUnauthorized access in campus, dialup, and Internet environments creates the potential for network intruders to gain access to sensitive network equipment and services. The Cisco AAA architecture enables systematic and scalable access security.

Add a note hereNetwork and administrative access security in the Cisco environment, whether it involves campus, dialup, or IPsec VPN access, is based on a modular architecture that has three functional components:

  • Add a note here Authentication: Authentication requires users and administrators to prove that they really are who they say they are. Authentication is established using a username and password, challenge and response, token cards, and other methods, such as “I am user student and my password validateme proves it.”

  • Add a note here Authorization: After authenticating the user and administrator, authorization services decide which resources the user and administrator are allowed to access and which operations the user and administrator are allowed to perform, such as “User student can access host serverXYZ using Telnet.”

  • Add a note here Accounting and auditing: Accounting records what the users and administrators actually did, what they accessed, and for how long they accessed it. Accounting keeps track of how network resources are used, such as “User student accessed host serverXYZ using Telnet for 15 minutes.”

Add a note here Introduction to AAA for Cisco Routers

Add a note hereTwo examples of AAA implementation include authenticating remote users that are accessing the corporate LAN through dialup or Internet (IPsec VPN) connections as shown in Figure 2-9, and authenticating administrator access to the router console port, auxiliary port, and vty ports.

Click to collapse
Add a note hereFigure 2-9: Implementing Cisco AAA

Add a note hereCisco networking products support AAA access control using a local usernames and passwords database or remote security server databases. A local security database is configured in the router for a small group of network users with the username xyz password strongpassword command or, preferably, the username xyz secret strongsecretpassword command. A remote security database is a separate server that provides AAA services for multiple network devices and a large number of network users by running RADIUS or TACACS+ protocols.

Add a note hereCisco provides four ways to implement AAA services for Cisco routers:

  • Add a note here Self-contained AAA: AAA services can be self-contained in the router or network access server (NAS) itself. This form of authentication is also known as local authentication.


    Note

    Add a note hereThe official Cisco definition of NAS is “network access server. Cisco platform (or collection of platforms, such as an AccessPath system) that interfaces between the packet world (for example, the Internet) and the circuit world (for example, the PSTN).”

    Add a note hereSource: Internetworking Terms and Acronyms, http://www.cisco.com/en/US/docs/internetworking/terms_acronyms/N12.html.

  • Add a note here Cisco Secure Access Control Server (ACS) for Microsoft Windows Server: AAA services on the router or NAS contact an external Cisco Secure ACS for Microsoft Windows system for user and administrator authentication.

  • Add a note here Cisco Secure ACS Express: This is an entry-level RADIUS and TACACS+ AAA server appliance. AAA services on the router or NAS contact an external Cisco Secure ACS Express device for user and administrator authentication. Cisco ACS Express is available as a one rack unit (RU), security-hardened appliance with a preinstalled Cisco Secure ACS Express license. Cisco ACS Express supports a maximum of 50 AAA clients and 350 unique user logons in a 24-hour period.

  • Add a note here Cisco Secure ACS Solution Engine: AAA services on the router or NAS contact an external Cisco Secure ACS Solution Engine for user and administrator authentication.

Add a note here Using Local Services to Authenticate Router Access

Add a note hereIf you have one or two NAS devices or routers that provide access to your network for a limited number of users, you can store username and password security information locally on the Cisco NAS devices or routers. This is referred to as local authentication on a local security database. The following are local authentication characteristics:

  • Add a note hereUsed for small networks

  • Add a note hereStores usernames and passwords in the Cisco router or Cisco NAS

  • Add a note hereUsers authenticate against the local security database in the Cisco router or Cisco NAS

  • Add a note hereDoes not require an external database

Add a note hereThe system administrator must populate the local security database by specifying username and password profiles for each user that might log in.

Add a note here Figure 2-10 shows how local authentication typically works.

Image from book
Add a note hereFigure 2-10: Implementing Authentication Using Local Services
  1. Add a note here The client establishes a connection with the router.

  2. Add a note hereThe router prompts the user for a username and password.

  3. Add a note hereThe router authenticates the username and password in the local database. The user is authorized to access the network based on information in the local database.

Authenticating Router Access

Add a note hereYou can use AAA to secure two different types of router access mode. The mode refers to the format of the packets that are requesting AAA services:

  • Add a note here Character mode: A user is sending a request to establish an EXEC mode process with the router, for administrative purposes.

  • Add a note here Packet mode: A user is sending a request to establish a connection through the router with a device on the network.

Add a note hereWith the exception of accounting commands, all the AAA commands apply to both character mode and packet mode.

Add a note hereFor a truly secure network, you must configure the router to secure administrative access and remote LAN network access using AAA services.

Add a note here Table 2-10 compares the router access modes, port types, and AAA command elements.

Add a note here Table 2-10: Router Access
Open table as spreadsheet

Add a note hereAccess Type

Add a note hereModes

Add a note hereNAS Ports

Add a note hereSpecifications

Add a note hereRemote administrative access

Add a note hereCharacter (line or EXEC mode)

Add a note heretty, vty, auxiliary, and console

Add a note here login, exec, enable

Add a note hereRemote network access

Add a note herePacket (interface mode)

Add a note hereasync, group-async BRI and PRI

Add a note here ppp, network

Configuring Local Database Authentication Using AAA

Add a note hereTo configure AAA services to authenticate administrator access (character mode access) or network access (packet mode), follow these general steps:

  • Add a note hereAdd usernames and passwords to the local router database for users who need administrative access to the router.

  • Add a note hereEnable AAA globally on the router, or confirm that it is already enabled.

  • Add a note hereConfigure AAA/parameters on the router.

  • Add a note hereConfirm and troubleshoot the AAA configuration.

Configuring User Accounts Using Cisco SDM

Add a note hereThe first step to configure AAA services for local authentication is to create users. Figure 2-11 shows the steps to use with Cisco SDM to create a user account in the local router database:

Click to collapse
Add a note hereFigure 2-11: Implementing Authentication Using Local services

Add a note here Step 1

Add a note hereChoose Configure > Additional Tasks > Router Access > User Accounts/View.

Add a note here Step 2

Add a note hereClick Add to add a new user.

Add a note here Step 3

Add a note hereIn the Add an Account window, enter the username and password in the appropriate fields to define the user account.

Add a note here Step 4

Add a note hereFrom the Privilege Level drop-down list, choose 15 unless you have defined lesser privilege levels.

Add a note here Step 5

Add a note hereIf you have defined views, you can check the Associate a View with the User check box and choose a view from the View Name list that you want to associate with this user.

Add a note here Step 6

Add a note hereClick OK.

Add a note hereCisco SDM will generate the following CLI command:

Add a note hereusername AAAadmin privilege 15 secret 5 $1$f16u$uKOO6J/UnojZ0bCEzgnQi1 view root
Enabling and Disabling AAA Using Cisco SDM

Add a note hereThe next step in configuring AAA is to make sure AAA is enabled. To verify the AAA configuration and to enable or disable AAA, choose Configure > Additional Tasks > AAA, as shown in Figure 2-12. AAA is enabled by default in Cisco SDM. If you click Disable, Cisco SDM displays a message telling you that it will make configuration changes to ensure that the router can be accessed after AAA is disabled. Disabling AAA will prevent you from configuring your router as an Easy VPN server, and will prevent you from associating user accounts with CLI views.

Click to collapse
Add a note hereFigure 2-12: Enabling and Disabling AAA Using Cisco SDM

Add a note hereIn the CLI, use the global configuration command aaa new-model to enable AAA. Use the no form of this command to disable AAA.

Configuring AAA Authentication Using Cisco SDM

Add a note hereA method list is a sequential list of authentication methods to query to authenticate a user. Method lists enable you to designate one or more security protocols to be used for authentication, thus ensuring a backup system for authentication in case the initial method fails.

Add a note hereWhen you first enable AAA, there is a default method list named default, which is automatically applied to all interfaces and lines, but which has no authentication methods defined. To configure AAA authentication, you must first either define a list of authentication methods for the default method, or configure your own named method lists and apply them to interfaces or lines. For flexibility, you can apply different method lists to different interfaces and lines. If an interface or line has a nondefault method list applied to it, that method overrides the default method list.

Add a note hereCisco IOS Software uses the first method listed to authenticate users. If that method fails to respond, the Cisco IOS Software selects the next authentication method listed in the method list. This process continues until there is successful communication with a listed authentication method or until all methods defined in the method list have been exhausted.

Add a note here It is important to note that the Cisco IOS Software attempts authentication with the next listed authentication method only when there is no response from the previous method. If authentication fails at any point in this cycle (meaning that the security server or local username database responds by denying the user access), the authentication process stops and no other authentication methods are attempted.

Add a note hereFollow these steps, shown in Figure 2-13, to configure the default method list for login authentication using the local database:

Click to collapse
Add a note hereFigure 2-13: Configuring AAA Authentication Using Cisco SDM

Add a note here Step 1

Add a note here Choose Configure > Additional Tasks > AAA > Authentication Policies > Login and click Add.

Add a note here Step 2

Add a note hereIn the Add a Method List for Authentication Login window, verify that Default is selected in the Name drop-down list.

Add a note here Step 3

Add a note hereClick Add.

Add a note here Step 4

Add a note hereFrom the Select Method List(s) for Authentication Login window, choose Local from the method list.

Add a note here Step 5

Add a note hereClick OK.

Add a note here Step 6

Add a note hereClick OK.

Add a note hereThe Cisco SDM will generate the following CLI command:

Add a note here
aaa authentication login default local

Note

Add a note hereRemember to save your work by clicking the Save button in the toolbar across the top.

Additional AAA CLI Commands

Add a note hereTo further secure administrative access to the router, you can specify the maximum number of failed AAA login attempts that can occur before an account is locked out. Currently, you can configure this option only from the CLI.

Add a note hereTo specify the maximum number of unsuccessful authentication attempts before a user is locked out, use the aaa local authentication attempts max-fail command in global configuration mode. To remove the number of unsuccessful attempts that was set, use the no form of this command. The complete syntax for this command is as follows:

Add a note here
aaa local authentication attempts max-fail number-of-unsuccessful-attempts

Add a note hereTo display a list of all locked-out users, use the show aaa local user lockout command in privileged EXEC mode.

Add a note here Example 2-23 shows that user1 is locked out.

Add a note here Example 2-23: show aaa local user lockout Command Output

Add a note hereR1# show aaa local user lockout
Local-user Lock time
user1 04:28:49 UTC Sat Dec 15 2007

Add a note hereUse the clear aaa local user lockout command in privileged EXEC mode to unlock a locked-out user. The complete syntax for this command is clear aaa local user lockout {username username | all}. To specify a single user to unlock, specify the username using the username parameter. To unlock all the users, use the all keyword. You might also consider using the clear aaa local user fail-attempts username username or the clear aaa local user fail-attempts all commands for cases in which you need to clear already logged unsuccessful attempts after the user configuration was changed.


Note

Add a note hereThe aaa local authentication attempts max-fail command differs from the login delay command in how it handles failed attempts. The aaa local authentication attempts max-fail command locks the user account if the authentication fails. This account stays locked until it is cleared by an administrator. The login delay command introduces a delay between failed login attempts without locking the account.

Add a note hereWhen a user logs in to a Cisco router and uses AAA, a unique ID is assigned to the session. Throughout the life of the session, various attributes that are related to the session are collected and stored internally within the AAA database. These attributes can include the IP address of the user, the protocol that is used to access the router (such as PPP or SLIP), the speed of the connection, and the number of packets or bytes that are received or transmitted.

Add a note here To display the attributes that are collected for a AAA session, use the show aaa user {all | unique id} command in privileged EXEC mode.


Note

Add a note hereThis command does not provide information for all of the users who are logged in to a device, but only for those who have been authenticated or authorized using AAA, or for those whose sessions are being accounted for by the AAA module.

Add a note hereAs shown in Example 2-24, you can use the show aaa sessions command to show the unique ID of a session.

Add a note here Example 2-24: show aaa sessions Command Output

Add a note hereR1# show aaa sessions
Total sessions since last reload: 4
Session Id: 1
Unique Id: 175
User Name: tecteam
IP Address: 10.30.30.2
Idle Time: 0
CT Call Handle: 0

Confirming and Troubleshooting the AAA Configuration

Add a note hereTo configure AAA services to authenticate administrator access (character mode access) or network access (packet mode), follow these general steps:

  • Add a note hereAdd usernames and passwords to the local router database for users that need administrative access to the router.

  • Add a note hereEnable AAA globally on the router, or confirm that it is already enabled.

  • Add a note hereConfigure AAA/parameters on the router.

  • Add a note hereConfirm and troubleshoot the AAA configuration.

Add a note here Example 2-25 shows an example of what the running configuration would look like after configuring AAA for local authentication using Cisco SDM and the CLI.

Add a note here Example 2-25: AAA Configuration

Add a note hereaaa new-model
aaa local authentication attempts max-fail 10
!
!
aaa authentication login default local

enable secret 5 $1$x1EE$33AXd2VTVvhbWL0A37tQ3.
enable password 7 15141905172924
!
username admin1 password 7 14161606050A7B7974786B
username admin2 secret 5 $1$ErWl$b5rDNK7Y5RHkxX/Ks7Hr00
username AAAadmin privilege 15 view root secret 5 $1$0GGC$1Y.WBhh7UQso8cJSkvv2N0
!

Add a note here To display information on AAA authentication, use the debug aaa authentication command in privileged EXEC command mode, as shown in Example 2-26. Use the no debug aaa authentication form of the command to disable this debug mode. Example 2-26 shows the debug output for a successful AAA authentication using a local database.

Add a note here Example 2-26: Displaying AAA Authentication Information

Add a note hereR1# debug aaa authentication
113123: Feb 4 10:11:19.305 CST: AAA/MEMORY: create_user (0x619C4940) user=''
ruser='' port='tty1' rem_addr='async/81560' authen_type=ASCII service=LOGIN priv=1
113124: Feb 4 10:11:19.305 CST: AAA/AUTHEN/START (2784097690): port='tty1' list=''
action=LOGIN service=LOGIN
113125: Feb 4 10:11:19.305 CST: AAA/AUTHEN/START (2784097690): using "default" list
113126: Feb 4 10:11:19.305 CST: AAA/AUTHEN/START (2784097690): Method=LOCAL
113127: Feb 4 10:11:19.305 CST: AAA/AUTHEN (2784097690): status = GETUSER
113128: Feb 4 10:11:26.305 CST: AAA/AUTHEN/CONT (2784097690): continue_login
(user='(undef)')
113129: Feb 4 10:11:26.305 CST: AAA/AUTHEN (2784097690): status = GETUSER
113130: Feb 4 10:11:26.305 CST: AAA/AUTHEN/CONT (2784097690): Method=LOCAL
113131: Feb 4 10:11:26.305 CST: AAA/AUTHEN (2784097690): status = GETPASS
113132: Feb 4 10:11:28.145 CST: AAA/AUTHEN/CONT (2784097690): continue_login
(user='diallocal')
113133: Feb 4 10:11:28.145 CST: AAA/AUTHEN (2784097690): status = GETPASS
113134: Feb 4 10:11:28.145 CST: AAA/AUTHEN/CONT (2784097690): Method=LOCAL
113135: Feb 4 10:11:28.145 CST: AAA/AUTHEN (2784097690): status = PASS



0 comments

Post a Comment