Securing Cisco AnyConnect with YubiKeys

Note: This article covers using YubiKeys with Cisco AnyConnect via RADIUS. For integrating Azure AD via SAML, please see Protecting Cisco VPN connections in a Microsoft Environment with Yubico.



Leveraging Cisco AnyConnect to provide remote VPN access to corporate resources is vital to enable a remote workforce. More and more people are using Cisco AnyConnect and Cisco’s Adaptive Security Appliance (ASA) to perform work remotely. It is critical that strong two factor authentication is integrated into Cisco’s VPN solution. Cisco’s solution is mature and has a number of options to integrate authentication vendors. Natively, user certificates and specifically smartcards are supported. Additionally, Cisco provides SAML and RADIUS integrations with identity providers (IDPs). These standard patterns provide a simple way to integrate a company's IDP with Cisco’s VPN solution. A number of IDP vendors have good step-by-step guides on how to integrate their product with Cisco AnyConnect and ASA.  This guide will walk through setting up Duo’s RADIUS Service for a standard Cisco ASA Server so that Yubico OTP can be used for MFA. See appendix for other IDP partner’s RADIUS setup guides.


For organizations with non-standard or complex deployments, it is recommended to contact Yubico Sales for more information.


Network Overview

A high level overview of the network configuration is shown below




1 + 2

Username and password entered (1), YubiKey is activated to generate the OTP which is passed along with the username and password (2)

3 + 4

Username/Password+YubiOTP passed through to Cisco VPN Server

5 + 6

Cisco hands off authentication to the authentication service via RADIUS


The Authentication Service splits the Username/Password and OTP, verifies U/P against the organization's AD. The public ID of the YubiKey is used to confirm the YubiKey is associated with the user.


If AD authentication is valid then the YubiOTP is validated by the authentication service, either by an internal validation server on prem or a cloud based validation service


If all factors are met the encrypted connection is made


Device Considerations

Yubico OTP is supported across all platforms as it is just seen as keyboard input but it is important to just check that you select the most appropriate hardware interface, ie USB-A, USB-C or even the Lightning based authenticator.


Cisco AnyConnect with YubiOTP Support per Operating System


Operating System










Apple iOS



Example: Securing CiscoASA with DUO via RADIUS

In our example scenario we utilise an existing Duo implementation to extend the Yubico OTP authentication to the VPN infrastructure.  Authentication will be to the local Active Directory first followed by secondary authentication via the Yubico OTP.




1 + 2

Username and password entered (1), YubiKey is activated to generate the OTP which is appended to the password, separated by a comma (2)

3 + 4

Username/Password+YubiOTP passed through to Cisco VPN Server

5 + 6

Cisco hands off authentication to the Duo Authentication Proxy via RADIUS


Duo Proxy splits the Username/Password and OTP, verifies U/P against AD


If AD authentication is valid then the YubiOTP is validated via the Duo platform


If all factors are met the encrypted connection is made


1. Preparing the RADIUS Service

To enable RADIUS within Duo there are a couple of steps:


  1. Enable the Cisco ASA VPN as a Duo application

  2. Install the Duo RADIUS proxy within the on-premises infrastructure

  3. Configure the connection between the local Cisco and the RADIUS proxy

2. Duo Application

Enabling RADIUS as an application is straightforward:


  1. Log into your Duo admin panel

  2. Navigate to Applications->Protect an Application

  3. Search for “Cisco RADIUS VPN” and click Protect

  4. Make note of the Integration Key, Secret Key and API Hostname

  5. Apply any policies that are required for your home workers, in our example we are enforcing 2FA for our Working From Home users.




3. Authentication Proxy

The Application Proxy acts as a RADIUS gateway between the local Cisco VPN and the Duo platform. Again the process is fairly straightforward:


  1. Download the relevant gateway package

  2. Refer to Duo documentation for the exact installation instructions, referenced at the end of this document.

  3. Create a configuration file based on the information noted down from Application configuration.

  4. Start the service


Example configuration file: 

















4. Cisco RADIUS Enablement

Once the Duo platform and the local proxy service has been configured then the Cisco VPN itself needs to be enabled to authenticate via the RADIUS service.


Whilst we are focusing on Cisco this process should be fairly standard across all VPN solutions as we are using a well defined networking solution in RADIUS.


There are two main actions that are required on the Cisco VPN:


  1. Create a AAA RADIUS authentication source

  2. Create or modify a VPN profile to use the new service

Again, refer to the full documentation for detailed steps but the basic configuration is shown below



AAA RADIUS Server config, using the “radius_secret” defined above


Once the RADIUS service has been defined it can be added to an existing profile or a new one can be defined




5. Client Side usage

If users are already accustomed to using the Cisco AnyConnect client then there is very little change to how they already work. Additionally, there are no required changes to the users’ VPN client. The user flow is:


  1. Start VPN client and select required profile if more than one

  2. Enter username in the appropriate field

  3. Enter password, followed by a comma, then touch the YubiKey to generate the OTP plus a carriage return. For example:

    Username: fred

    Password: Password12,cccccchuuuvngeklxtnkbbgiigfgbbtcxgbbbthfkvgr



DUO and Cisco resources

Cisco VPN integration resources from other partners