AAA network security services provide the primary framework to set up access control on a network device. Network and administrative AAA security in the Cisco environment has three functional components: Authentication, Authorization, and Accounting
AAA Authentication can be used to authenticate users for administrative access or it can be used to authenticate users for remote network access. Authentication can be established using username and password combinations, challenge and response questions, token cards, and other methods.
Cisco provides two common methods of implementing AAA services:
Local AAA uses a device's local database for authentication. This database is the same one that is required for establishing role-based CLI. Local AAA is ideal for small networks, as the system administrator must populate the local security database with profiles for each user that might log in.
This method is sometimes known as self-contained authentication.
username name secret password
global configuration command.aaa new-model
command.aaa authentication login list method(s)
command.When the aaa new-model command is first entered, an unseen “default” authentication, using the local database, is automatically applied to all lines except the console. For this reason, always configure a local database entry before enabling AAA.
The final portion of the aaa authentication login
command identifies the type of methods that will be queried to authenticate the users. Up to four methods can be defined, providing fallback methods should one method not be available.
Cisco IOS software attempts authentication with a fallback method only when an error occurs trying the preceding method. If the authentication method denies the user access, the authentication process stops and no other authentication methods are allowed.
The following table displays common AAA authentication methods that can be specified:
Method | Description |
---|---|
enable |
Uses the enable password for authentication. |
local |
Uses the local username database for authentication. |
local-case |
Uses case-sensitive local username authentication. |
none |
Uses no authentication. |
group radius |
Uses the list of all RADIUS servers for authentication. |
group tacacs+ |
Uses the list of all TACACS+ servers for authentication. |
group group-name |
Uses a subset of RADIUS or TACACS+ servers for authentication as defined by the aaa group server radius or aaa group server tacacs+ command. |
For security purposes, use the none keyword only when testing the AAA configuration.
For flexibility, different method lists can be applied to different interfaces and lines using the aaa authentication login list
command.
If a line has a custom authentication method list applied to it, that method list overrides the default method list for that interface. When a custom authentication method list is applied to an interface, it is possible to return to the default method list by using the no authentication login command.
When configuring authenticaion for multiple routers and switches, server-based AAA is more appropriate. With the server-based method, the router accesses a central AAA server—which contains the usernames and password for all users—rather than relying on a local database. For increased redundancy, multiple servers can be implemented.
Client devices use either the Remote Authentication Dial-In User Service (RADIUS) or Terminal Access Controller Acces s Control System (TACACS+) protocols to communicate with the AAA server.
It is important to understand the many differences between the TACACS+ and RADIUS protocols:
Implementation | TACACS+ | RADIUS |
---|---|---|
Functionality | Separates AAA according to the AAA architecture, allowing modularity of the security server implementation. | Combines authentication and authorization but separates accounting, allowing less flexibility in implementation than TACACS+. |
Standard | Mostly Cisco supported | Open/RFC standard |
Transport Protocol | TCP (port 49) | UDP |
CHAP | Bidirectional challenge and response as used in Challenge Handshake Authentication Protocol (CHAP). | Unidirectional challenge and response from the RADIUS security server to the RADIUS client. |
Confidentiality | Entire packet encrypted | Password encrypted |
Customization | Provides authorization of router commands on a per-user or per-group basis | Has no option to authorize router commands on a per-user or per-group basis |
Accounting | Limited | Extensive (includes 802.1X and SIP) |
TACACS+ provides separate AAA services. Separating the AAA services provides flexibility in implementation because it is possible to use TACACS+ for authorization and accounting while using another method of authentication.
aaa new-model
command.{tacacs|radius} server name
global configuration command and subsequent server-configuration-mode commands.key string
command.By default, TACACS+ establishes a new TCP session for every authorization request, which can lead to delays when users enter commands. To improve performance, AAA supports persistent TCP sessions that are configured with the single-connection
tacacs server configuration command.
Additional security can be implemented on the line using the aaa local authentication attempts max-fail attempts
global configuration command.
This command secures AAA user accounts by locking accounts that have been the subject of multiple failed attempts to log in. The locked out user account remains locked until it is manually cleared by an administrator, using the clear aaa local user lockout
privileged EXEC mode command. To display a list of all locked-out users, use the show aaa local user lockout
command.
After the user is authenticated, authorization services determine which resources the user can access and which operations the user is allowed to perform. This is done through a set of attributes that describes the user’s access to the network.
Authorization attributes are compared to information contained within the AAA database, which then delivers restrictions for a given user to the local router where the user is connected.
Authorization is automatic and does not require users to perform additional steps after authentication.
To configure authorization, use the aaa authorization type list method(s)
command:
The authorization-type keywords specify the types of commands or services to protect:
Type | Usage |
---|---|
network |
For network services such as PPP and SLIP. |
exec |
For User EXEC terminal sessions. |
commands level |
Command authorization attempts authorization for all EXEC mode commands, including global configuration commands, associated with a specific privilege level. |
AAA Accounting collects and reports usage data. This data can be used for such purposes as auditing or billing. The collected data might include the start and stop connection times, the commands executed, the number of packets, and the number of bytes.
Accounting is implemented using a AAA server. This service reports usage statistics back to the ACS server. These statistics can be extracted to create detailed reports about the configuration of the network.
To configure authorization, use the aaa accounting type list {start-stop | stop-only | none} [broadcast] method(s)
command:
The accounting-type keywords specify the types of commands or services to report:
Type | Usage |
---|---|
network |
Runs accounting for all network-related service requests, including PPP. |
exec |
Runs accounting for the EXEC shell session. |
connection level |
Runs accounting on all outbound connections such as SSH and Telnet. |
The trigger-condition keyword is used to specify what actions cause accounting records to be updated:
Trigger | Meaning |
---|---|
start-stop |
Sends a "start" accounting notice at the beginning of a process and a "stop" accounting notice at the end of the process. |
stop-only |
Sends a "stop" accounting record for all cases including authentication failures. |
none level |
Disables accounting services on a line or interface. |
Accounting provides additional security to the network, by keeping a detailed log of exactly what authenticated users do on managed devices. This information is useful when troubleshooting devices. It also provides leverage against individuals who perform malicious actions.
To display the attributes that are collected for one AAA session, use the show aaa user
privileged EXEC command. This command only provides information for those users who have been authenticated or authorized using AAA, or whose sessions are being accounted for by the AAA module.
The show aaa sessions
command can be used to show details about current and recent sessions.
An Access Control List (ACL) is a network management service that is used to filter packets based on information found in the packet header. By default, a router does not have any ACLs configured. However, when an ACL is applied to an interface, the router performs the additional task of evaluating all network packets as they pass through the interface to determine if the packet can be forwarded.
An ACL uses a sequential list of permit or deny statements, known as Access Control Entries (ACEs), which are also sometimes referred to as "ACL Statements".
Several tasks performed by routers require the use of ACLs to identify and manage network traffic:
An Inbound ACL filters packets before they are routed to the outbound interface. An inbound ACL is efficient because it saves the overhead of routing lookups if the packet is discarded. Inbound ACLs are most efficient when the permissions applied by the ACL are only relevant to one inbound interface.
An outbound ACL filters packets after they are routed to the outbound interface, no matter the inbound interface. Outbound ACLs are most efficient when the same filter will be applied to packets coming from multiple inbound interfaces before exiting the same outbound interface.
Outbound ACLs do not act on packets that originate from the device performing the filtering.
The last statement of an ACL is always an implicit deny that blocks all traffic. By default, this statement is implicitly applied to the end of an ACL, but will not displayed in the configuration.
An ACL must have at least one permit statement otherwise all traffic will be denied due to the implicit deny ACE statement.
Cisco routers support two types of ACLs:
Numbered ACLs
ACLs number 1-99 and 1300-1999 are standard ACLs while ACLs number 100-199 and 2000-2699 are extended ACLs:
Named ACLs
Named ACLs are preferred, to provide information about the purpose of the ACL.
The guidelines for named ACLs can be summarized as:
A wildcard masks is a 32-bit address string that looks like a subnet mask. However, where the subnet mask uses a high-bit to indicate a position that must be matched and a low-bit to indicate a wild position, the wildcard mask works in reverse:
In this way, ACE rules can be scaled to match an address range, or an entire subnet.
For example:
Wildcard Mask | Meaning |
---|---|
0.0.0.0 | All octets of the packet address must exactly match the ACE's target address. |
0.0.0.255 | The first three octets must exactly match, while the final octet may have any value. |
0.0.0.252 | The first three octets must exactly match. The first six bits of the last octet may have any value. The final two bits must again match the target address! |
The easiest way to match a range of addresses is to subtract the subnet mask of the range from the /32 mask (255.255.255.255).In other words, the entire range of addresses included in the subnet /28 mask (255.255.255.240) can be matched by subtracting /28 from /32: 0.0.0.15
Wildcard Mask Keywords
Cisco IOS provides two keywords to identify the most common uses of wildcard masking:
Wildcard keyword come before the target address. The following ACE statements would block the device at 192.168.10.10, while allowing all other traffic. ACLs of this type are referred to a "block-lists", because they only block traffic from specific addresses.
To create a new ACL, use the ip access-list {standard|extended} identifier
global configuration command. This will enter ACL configuration mode.
To configure an Access Control Entry (ACE), i.e. a permit
or deny
instruction, use the access-list identifier {permit|deny} ip-address [mask] [log]
configuration command. The access-list identifier
prefix is not used when in ACL configuration mode.
To create a numbered ACL, skip the ip access-list
command. A new, numbered ACL is automatically generated when an access-list identifier
global configuration command indicates a numbered list that does not yet exist.
The options for this command are described below:
Paramter | Description |
---|---|
identifier |
The name or number of the ACL that the new rule should be associated with. |
deny |
Deny access if the condition is matched. |
permit |
Permits access if the condition is matched. |
ip-address |
This identifies the source network or host address to filter. |
mask |
(Optional) This is a 32-bit wildcard mask that is applied to the source (see below). If omitted, a default 0.0.0.0 mask is assumed. |
log |
(Optional) This keyword generates an informational message whenever the ACE is matched. ACL logging seriously affects the performance of the device, and should only be used when an administrator is trying to thwart a network attack. |
Extended Syntax IPv4 ACL entries provide additional options for configuration:
access-list identifier {permit|deny} protocol source-address [source-mask] [operator port(s)] destination-address [destination-mask] [operator port(s)] [log]
Note that, for Extended ACLs, the target ip-address
attribute is split into separate source
and destination
parameters.
Several additional options available to the Extended ACL entries are descibed below:
Paramter | Description |
---|---|
protocol |
Name or number of an internet protocol. Some common protocol keywords include ip, tcp, udp, and icmp. The ip keyword matches all IP protocols. |
operator |
(Optional) This compares the source or destination port to the listed port(s). Operators include lt (less than), gt (greater than), eq (equal), neq (not equal), and range (inclusive range). |
port(s) |
(Optional) Up to 10 numeric port numbers and/or common TCP/UDP port names (e.g. ftp , irc , and so on). |
established |
(Optional, applies to TCP protocol only) This is a 1st-generation stateful firewall feature. When configured, this ACE statement will only match if the returning TCP segment has the ACK or RST (reset) flag bits set. |
Documentation can be added to the ACL configuration via the access-list identifier remark text ip-address
configuration command. Each remark
entry is limited to 100 characters.
ACE statements must indicate an IP address as a base for the rule to match. The ACE address must exactly match the source IP (for Standard ACLs) or destination IP (using Extended ACLs) of the incoming packet. However, ACE statements also employ a wildcard mask to indicate bits in the IP address that can be ignored.
ACL entries can be modified in one of two ways:
no access-list identifier
, and then recreated using the corrected configuration.ip access-list type identifier
) for the desired ACL. Once in ACL Configuration mode, use the no sequence-number
command to remove a specific entry (use show access-lists
to see each entry in an ACL). Write a new entry by prepending the same sequence-number to the correct ACE configuration command (e.g. 10 permit host 192.168.10.10
).To apply an ACL to an interface, use the ip access-group identifier {in|out}
interface configuration command. To apply the ACL to the console line, use ip access-class identifier {in|out}
. The final segment of the command indicates whether the ACL should be applied to inbound or outbound traffic on that interface.
Additional useful notes:
An IPv6 ACL contains an implicit deny ipv6 any any
and two implicit permit rules to enable IPv6 neighbor discovery. If an administrator manually configures the deny ipv6 any any
command without explicitly permitting neighbor discovery, then the IPv6 Neighbor Discovery Protocol (NDP) will be disabled.
Create an IPv6 ACL using the following command syntax:
Apply an IPv6 ACL to an interface with the ipv6 traffic-filter name
command.
Several additional options available to IPv6 ACL entries, as descibed below:
Paramter | Description |
---|---|
dscp value |
(Optional) Matches against the Traffic Class value field of the IPv6 packet header. The acceptable range is 0-63. |
fragments |
(Optional) Matches non-initial fragmented packets where the fragment extension header contains a non-zero fragment offset. |
log input |
(Optional) Provides the same function as the log keyword, except that the logging message also includes the input interface. |
sequence value |
(Optional) Specifies the sequence number value for the ACE. The acceptable range is 1-4294967295. This setting allows creation of the ACL in an arbitrary order. |
time-range dname |
(Optional) Specifies the time range that applies to the permit statement. The name of the time range and its restrictions are specified by the time-range command |
The IEEE 802.1X standard defines a port-based access control and authentication protocol that restricts unauthorized workstations from connecting to a LAN through publicly accessible switch ports.
The 802.1x roles include:
The switch uses a RADIUS software agent, which is responsible for encapsulating and de-encapsulating the EAP (Extensible Authentication Protocol) frames and interacting with the authentication server.
The RADIUS security system with EAP extensions is the only supported authentication server.
The switch port state determines whether the client is granted access to the network:
When configured for 802.1X port-based authentication, the port starts in the unauthorized state. While in this state, the port disallows all ingress and egress traffic except for 802.1X protocol, STP, and CDP packets.
When a client is successfully authenticated, the port transitions to the authorized state, allowing all traffic for the client to flow normally.
If the switch requests the client identity (authenticator initiation) and the client does not support 802.1X, the port remains in the unauthorized state, and the client is not granted access to the network.
When a client logs out, it sends an EAPOL-logout message, causing the switch port to transition to the unauthorized state.
When an 802.1X-enabled client connects to a port and the client initiates the authentication process (supplicant initiation) by sending the EAPOL-start frame to a switch that is not running the 802.1X protocol, the client will continue sending frames as if the port were in the authorized state.
to enable 802.1X on the port, use the authentication port-control auto
interface configuration command.
It may sometimes be necessary to configure a switch port to override the 802.1X authentication process. To do this, use the authentication port-control {force-authorized|force-unauthorized}
interface configuration command.
Configuring 802.1X requires a few basic steps:
aaa new-model
command.radius server name
global configuration command. This will enter the radius-server subconfiguration mode.address {ipv4|ipv6} ip-address auth-port port acct-port port
radius-server sub-configuration command.aaa authentication dot1x list group protocol
global configuration command.dot1x system-auth-control
global configuration command.authentication port-control auto
interface configuration command.dot1x pae authenticator
interface command.
The authenticator
option sets the Port Access Entity (PAE) type so the interface acts only as an authenticator and will not respond to any messages meant for a supplicant.
Example:
There are two configuration models for Cisco IOS Firewall:
Both configuration models can be enabled concurrently on a router, but not on a single interface.
Policies identify actions that the ZPF will perform on network traffic. There are three possible actions that can be configured:
The basic zone rules depend on the zones of the ingress and egress interfaces used by the inspected traffic:
Zone-Based Policy Firewall (ZPF) configuration has five steps:
Create zones using the zone security name
global configuration command.
Traffic classes are used to identify packets based on their contents. Once assigned to a traffic class, packets can be managed by firewall policies.
Configure traffic classes via the class-map type inspect {match-any|match-all} name
global configuration command.
There are two packet-match modes used to determine class-eligibility:
match-any
— Packets must meet at least one match criterion.match-all
— Packets must meet all match criteria.The class-map
command enters the class-map sub-configuration mode. There are three ways to filter for class-map matching:
match access-group acl-identifier
— matches packets that pass the indicated ACL policy.match protocol protocol-identifier
— matches packets that use the indicated protocol.match class-map class-map-name
— matches packets that are eligible for the indicated class.Example:
Zone-based firewalls filter traffic based on the traffic classes assigned to the traffic. This is done through the use of policy maps, which define what action to take when inspected traffic belongs to a configured class-map.
There are three steps to configure a policy map:
policy-map type inspect name
global configuration command. This will enter the policy-map sub-configuration mode.class type inspect name
. This will enter the policy-map class-action sub-configuration mode.{inspect|drop|pass}
command. If the inspect action is chosen, then the router will maintain session information for TCP and UDP packets, in order to permit return traffic.
Similar to the implicit deny any at the end of every ACL, there is an explicit drop applied by the IOS to the end of every policy−map. It is listed as class class-default in the last section of any policy-map configuration.
Example:
To identify a zone-pair, use the zone-pair security zone-pair-name source {source-zone-name|self} destination {destination-zone-name|self}
global configuration command. This will enter the zone-pair configuration mode. Apply a policy to the zone-pair traffic flow via the service-policy type inspect policy-map–name
command.
The self zone is the router itself and includes all of the IP addresses assigned to the router interfaces. This zone is used for traffic that originates at the router or is addressed to a router interface, and should exclusively consist of device management traffic, such as SSH connections or traffic forwarding control packets.
Assigning an interface to a zone will immediately apply the service-policy that has been associated with that zone. If no service-policy has been configured for the zone, all transit traffic will be dropped.
To assign an interface to a zone, use the zone-member security zone-name
interface configuration command.
Traffic can never flow between an interface assigned to a zone and an interface without a zone assignment. Applying the zone-member configuration command always results in a temporary interruption of service until the other zone-member is configured.