PDF(228.3 KB) View with Adobe Reader on a variety of devices
ePub(276.1 KB) View in various apps on iPhone, iPad, Android, Sony Reader, or Windows Phone
Mobi (Kindle)(327.7 KB) View on Kindle device or Kindle app on multiple devices
Updated:January 2, 2019
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document provides a sample configuration of how to configure an IOS/IOS-XE headend for remote access using AnyConnect IKEv2 and AnyConnect-EAP authentication method with local user database.
Cisco recommends that you have knowledge of these topics:
The information in this document is based on these software and hardware versions:
Cisco Cloud Services Router running IOS XE 16.9.2
AnyConnect client version 4.6.03049 running on Windows 10
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
AnyConnect-EAP, also known as aggregate authentication, allows a Flex Server to authenticate the AnyConnect client using the Cisco proprietary AnyConnect-EAP method. Unlike standard based Extensible Authentication Protocol (EAP) methods such as EAP-Generic Token Card (EAP-GTC), EAP- Message Digest 5 (EAP-MD5) and so on, the Flex Server does not operate in EAP pass-through mode. All EAP communication with the client terminates on the Flex Server and the required session key used to construct the AUTH payload is computed locally by the Flex Server. The Flex Server has to authenticate itself to the client using certificates as required by the IKEv2 RFC.
Local user authentication is now supported on the Flex Server and remote authentication is optional. This is ideal for small scale deployments with less number of remote access users and in environments with no access to an external Authentication, Authorization, and Accounting (AAA) server. However, for large scale deployments and in scenarios where per-user attributes are desired it is still recommended to use an external AAA sever for authentication and authorization. The AnyConnect-EAP implementation permits the use of Radius for remote authentication, authorization and accounting.
Authenticating and Authorizating users using the Local Database
Note: In order to authenticate users against the local database on the router, EAP needs to be used. However, in order to use EAP, the local authentication method has to be rsa-sig, so the router needs a proper certificate installed on it, and it can't be a self-signed certificate.
Sample configuration that uses local user authentication, remote user and group authorization and remote accounting.
Step 1. Enable AAA, and configure authentication, authorization and accounting lists and add a username to the local database:
aaa new-model ! aaa authentication login a-eap-authen-local local aaa authorization network a-eap-author-grp local ! username test password cisco123
Step 2. Configure a trustpoint that will hold the router certificate. PKCS12 file import is used in this example. For other options, please consult the PKI (Public Key Infrastructure) configuration guide:
Note: AnyConnect uses '*$AnyConnectClient$*' as its default IKE identity of type key-id. However, this identity can be manually changed in the AnyConnect profile to match deployment needs.
Note: In order to upload the XML profile to the router, IOS-XE 16.9.1 version or later is required. If older version of IOS-XE software is used, the profile download capability needs to be disabled on the client. Please refer to the section "Disabling the AnyConnect downloader capability" for more information.
Upload the created XML profile to the flash memory of the router and define the profile:
Note: The filename used for AnyConnect XML profile should be acvpn.xml.
Step 7. Create an IKEv2 profile for AnyConnect-EAP method of client authentication.
crypto ikev2 profile AnyConnect-EAP match identity remote key-id *$AnyConnectClient$* authentication local rsa-sig authentication remote anyconnect-eap aggregate pki trustpoint IKEv2-TP aaa authentication anyconnect-eap a-eap-authen-local aaa authorization group anyconnect-eap list a-eap-author-grp ikev2-auth-policy aaa authorization user anyconnect-eap cached virtual-template 100 anyconnect profile acvpn
Note: Configuring the remote authentication method before the local authentication method will be accepted by the CLI, but will not take effect on versions that do not have the fix for the enhancement request CSCvb29701, if the remote authentication method is eap. For these versions, when configuring eap as the remote authentication method, ensure the local authentication method is configured as rsa-sig first. This problem is not seen with any other form of remote authentication method.
Note: On versions of code affected by CSCvb24236 , once remote authentication is configured before local authentication, the remote authentication method can no longer be configured on that device. Please upgrade to a version that has the fix for this code.
Step 8. Disable HTTP-URL based certificate lookup and HTTP server on the router:
no crypto ikev2 http-url cert no ip http server no ip http secure-server
Note: Referthis document to confirm whether your router hardware supports the NGE encryption algorithms (for example the example above has NGE algorithms). Otherwise IPSec SA installation on the hardware will fail at the last stage of negotiation.
Step 9. Define the encryption and hash algorithms used to protect data
crypto ipsec profile AnyConnect-EAP set transform-set TS set ikev2-profile AnyConnect-EAP
Step 11. Configure a loopback interface with some dummy IP address. The Virtual-Access interfaces will borrow the IP address from it.
interface loopback100 ip address 10.0.0.1 255.255.255.255
Step 12. Configure a virtual-template (associate the template in the IKEv2 profile)
interface Virtual-Template100 type tunnel ip unnumbered Loopback100 ip mtu 1400 tunnel mode ipsec ipv4 tunnel protection ipsec profile AnyConnect-EAP
Steap 13 (Optional). By default, all traffic from the client will be sent through the tunnel. You can configure split tunnel, which allows only selected traffic to go through the tunnel.
ip access-list standard split_tunnel permit 10.0.0.0 0.255.255.255 ! crypto ikev2 authorization policy ikev2-auth-policy route set access-list split_tunnel
Step 14 (Optional). If all traffic is required to go through the tunnel, you may configure NAT in order to allow internet connectivity for remote clients.
ip access-list extended NAT permit ip 192.168.10.0 0.0.0.255 any ! ip nat inside source list NAT interface GigabitEthernet1 overload ! interface GigabitEthernet1 ip nat outside ! interface Virtual-Template 100 ip nat inside
Disabling the AnyConnect downloader capability (optional).
This step is only necessary if IOS-XE software version older than 16.9.1 is being used. Prior to IOS-XE 16.9.1 the capability to upload the XML profile to the router was not available. The AnyConnect client tries to perform download of the XML profile after successful login by default. If the profile is not available, the connection fails. As a workaround, it is possible to disable the AnyConnect profile download capability on the client itself. In order to do that, the following file can be modified:
For Windows: C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\AnyConnectLocalPolicy.xml
For MAC OS: /opt/cisco/anyconnect/AnyConnectLocalPolicy.xml
The "BypassDownloader" option should be set to "true", for example:
After the modification, the AnyConnect client needs to be restarted.
AnyConnect XML profile delivery
With the fresh installation of the AnyConnect (with no XML profiles added), the user is able to manually enter the FQDN of the VPN gateway in the address bar of AnyConnect client. This results in the SSL connection to the gateway. The AnyConnect client will not attempt to establish the VPN tunnel with IKEv2/IPsec protocols by default. This is the reason why having XML profile installed on the client is mandatory to establish the IKEv2/IPsec tunnel with IOS-XE VPN gateway.
The profile is used when it is being selected from the drop-down list of AnyConnect address bar. The name that will appear is the same name as specified in "Display Name" in AnyConnect profile editor. In this example the user should select the following:
The XML profile can be manually put into the following directory:
For Windows: C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile
For MAC OS: /opt/cisco/anyconnect/profile
The AnyConnect client needs to be restarted in order for the profile to become visible in the GUI. It's not sufficient to close the AnyConnect window. The process can be restarted by right-clicking AnyConnect icon in the Windows tray and selecting "Quit" option:
IKEv2 and EAP exchange
Use this section in order to confirm that your configuration works properly.
! Check IKEv2 SA parameters Router# show crypto ikev2 sa detailed
IPv4 Crypto IKEv2 SA
Tunnel-id Local Remote fvrf/ivrf Status 1 192.0.2.1/4500 192.0.2.100/50899 none/none READY Encr: AES-CBC, keysize: 256, PRF: SHA256, Hash: SHA256, DH Grp:14, Auth sign: RSA, Auth verify: AnyConnect-EAP Life/Active Time: 86400/758 sec CE id: 1004, Session-id: 4 Status Description: Negotiation done Local spi: 413112E83D493428 Remote spi: 696FA78292A21EA5 Local id: 192.0.2.1 Remote id: *$AnyConnectClient$* Remote EAP id: test <------ username Local req msg id: 0 Remote req msg id: 31 Local next msg id: 0 Remote next msg id: 31 Local req queued: 0 Remote req queued: 31 Local window: 5 Remote window: 1 DPD configured for 0 seconds, retry 0 Fragmentation not configured. Dynamic Route Update: disabled Extended Authentication not configured. NAT-T is detected outside Cisco Trust Security SGT is disabled Assigned host addr: 192.168.10.8. <---- Assigned IP Initiator of SA : No
! Check the crypto session information Router# show crypto session detail Crypto session current status
Code: C - IKE Configuration mode, D - Dead Peer Detection K - Keepalives, N - NAT-traversal, T - cTCP encapsulation X - IKE Extended Authentication, F - IKE Fragmentation R - IKE Auto Reconnect, U - IKE Dynamic Route Update S - SIP VPN
Interface: Virtual-Access1. <----- Virtual interface associated with the client Profile: AnyConnect-EAP Uptime: 00:14:54 Session status: UP-ACTIVE Peer: 192.0.2.100 port 50899 fvrf: (none) ivrf: (none). <----- Public IP of the remote client Phase1_id: *$AnyConnectClient$* Desc: (none) Session ID: 8 IKEv2 SA: local 192.0.2.1/4500 remote 192.0.2.100/50899 Active Capabilities:N connid:1 lifetime:23:45:06 IPSEC FLOW: permit ip 0.0.0.0/0.0.0.0 host 192.168.10.8 Active SAs: 2, origin: crypto map Inbound: #pkts dec'ed 89 drop 0 life (KB/Sec) 4607990/2705. <------ Packets received from the client Outbound: #pkts enc'ed 2 drop 0 life (KB/Sec) 4607999/2705. <------ Packets sent to the client
! Check the actual configuration applied for the Virtual-Acces interface associated with client Router# show derived-config interface virtual-access 1. Building configuration...
Derived configuration : 258 bytes ! interface Virtual-Access1 ip unnumbered Loopback100 ip mtu 1400 ip nat inside tunnel source 192.0.2.1 tunnel mode ipsec ipv4 tunnel destination 192.0.2.100 tunnel protection ipsec profile AnyConnect-EAP no tunnel protection ipsec initiate end
This section provides information you can use in order to troubleshoot your configuration.