Duo integrates with your Cisco ASA VPN to add two-factor authentication to any VPN login. The SSL VPN integration supports inline self-service enrollment and authentication prompt. Use the SSL VPN integration to protect web-based VPN logins and AnyConnect desktop and mobile client connections that use SSL encryption.
If you need to protect connections that use Cisco's desktop VPN client (IKE encryption), use our Cisco IPSec integration instructions.
Before starting, make sure that Duo is compatible with your Cisco ASA device. Log on to your Cisco ASDM interface and verify that your Cisco ASA firmware is version 8.3 or later.
Then you’ll need to:
- Sign up for a Duo account
- Create a new Cisco SSL VPN integration to get an integration key, secret key, and API hostname. (See Getting Started for help.)
- Download the Duo Cisco integration package from the Duo administrative interface, and unzip it somewhere convenient such as your desktop.
This integration communicates with Duo’s service on TCP port 636. Also, we do not recommend locking down your firewall to individual IP addresses, since these may change over time to maintain our service’s high availability.
Modify the sign-in page
To add the Duo integration to your Cisco sign-in page:
- Log on to your Cisco ASA administrator web interface (ASDM).
- Click the Configuration tab and then click Remote Access VPN in the left menu.
- Navigate to Clientless SSL VPN Access → Portal → Web Contents. Then click Import.
- In the Source section, select Local computer, click Browse Local Files…, and find the Duo-Cisco-vX.js file extracted from the Duo-Cisco-vX-accountid.zip file downloaded earlier from the Duo admin console where vX will reflect the actual version of the Duo Cisco package and accountid is your organization’s Duo Account ID (visible on the Settings tab of the Duo admin interface) i.e. Duo-Cisco-v5-1234-5678-90.zip). After the file is selected,
Duo-Cisco-vX.jswill appear in the Web Content Path box.
- In the Destination section, select No in response to “Require authentication to access its content?”
- Click Import Now then click Apply
- Navigate to Clientless SSL VPN Access → Portal → Customization, select the Customization Object you want to modify, and then click Edit.
- In the outline on the left, click Title Panel (under Logon Page).
- Then type
<script src="/+CSCOU+/Duo-Cisco-vX.js"></script>(replacing vX with the file version actually downloaded) in the Text: box. Click OK.
- Click Apply
Add the Duo LDAP server
Navigate to AAA/Local Users → AAA Server Groups, click Add, and fill out the form:
Server Group Duo-LDAP Protocol LDAP
- Click OK.
- Select the Duo-LDAP group you just added.
In the Servers in the Selected Group section, click Add and fill out the form:
Interface Name Choose your external, internet-facing interface (it may be called “outside”) Server Name or IP Address Your API hostname (i.e.
Timeout 60 seconds
Check Enable LDAP over SSL and fill out the form (replacing INTEGRATION_KEY and SECRET_KEY with your integration-specific keys) :
Server Port 636 Server Type — Detect Automatically/Use Generic Type — Base DN dc=INTEGRATION_KEY,dc=duosecurity,dc=com Scope One level beneath the Base DN Naming Attribute(s) cn Login DN dc=INTEGRATION_KEY,dc=duosecurity,dc=com Login Password SECRET_KEY
- Click OK.
- Click Apply.
Configure the Duo LDAP server
- Navigate to Clientless SSL VPN Access → Connection Profiles
- Select the connection profile near the bottom and click Edit (the connection profile might be called “DefaultWEBVPNGroup”).
- Choose Secondary Authentication (under Advanced) from the left menu.
- Select Duo-LDAP from the Server Group list.
- Uncheck the Use LOCAL if Server Group fails check box.
- Check the Use primary username check box.
- Click OK.
- Click Apply.
If any of your users will be logging in through desktop or mobile AnyConnect clients (click here to learn more about Duo and AnyConnect), you’ll need to increase the AnyConnect Authentication Timeout so that users have enough time to use Duo Push or phone callback. Here’s how:
- Navigate to Configuration → Remote Access VPN → Network (Client) Access → AnyConnect Client Profile
- Click Edit
- In the left menu, navigate to “Preferences (Part 2)”.
- Scroll to the bottom of the page and modify the “Authentication Timeout (seconds)” setting to 60 seconds.
- Click OK.
- Click Apply to activate the new AnyConnect Client settings.
You now have an increased authentication timeout. This timeout will take effect after each client successfully logs into the VPN after applying the new profile.
Test Your Setup
Visit your Cisco ASA SSL VPN Service URL (it usually ends in
/+CSCOE+/logon.html). After you complete primary authentication, the Duo enrollment/login prompt appears.
Using AnyConnect? Learn how Duo works with desktop and mobile AnyConnect clients.
- Cisco SSL VPN connection initiated
- Primary authentication
- Cisco ASA connection established to Duo Security over TCP port 636
- Secondary authentication via Duo Security’s service
- Cisco ASA receives authentication response
- Cisco SSLVPN connection established
You can configure the Duo integration on your ASA using the Cisco command line.
SSH into your ASA and access the config terminal.
login as: asaadmin asaadmin@ciscoasa's password: Type help or '?' for a list of available commands. ciscoasa> enable Password: ******** ciscoasa# config ciscoasa# config terminal ciscoasa(config)#
Enable scopy if not already permitted.
ciscoasa(config)# ssh scopy enable
Use scopy (scp or pscp) to upload the Duo sign-in page customizations (downloaded from the Duo integration properties page back in step 3 of “First Steps”) to your ASA.
c:\>pscp.exe c:\Duo-Cisco-v5.js asaadmin@ciscoasa:Duo-Cisco.v5.js asaadmin@ciscoasa's password: ******** Duo-Cisco-v5.js | 71 kB | 35.9 kB/s | ETA: 00:00:00 | 100%
Then import the new web content package.
ciscoasa(config)# import webvpn webcontent /+CSCOU+/Duo-Cisco-v5.js disk0:Duo-Cisco-v5.js * Web resource `+CSCOU+/Duo-Cisco-v5.js' was successfully initialized
Export a web customization object for modification. The default customization object is named “DfltCustomization”.
ciscoasa(config)# export webvpn customization DfltCustomization disk0:/DfltCustomization %INFO: Customization object 'DfltCustomization' was exported to disk0:/DfltCustomization
Then download the exported customization object from the ASA.
c:\>pscp.exe asaadmin@ciscoasa:disk0:/DfltCustomization DfltCustomization asaadmin@ciscoasa's password: DfltCustomization | 9 kB | 9.6 kB/s | ETA: 00:00:00 | 100%
Open the downloaded web customization object in an XML editor. Edit the “title-panel” section of the page to add the path to the Duo-Cisco-v5.js file you just uploaded to the ASA. The edit should be as follows:
<text l10n="yes"><![CDATA[<script src="/+CSCOU+/Duo-Cisco-v5.js"></script>]]></text>
Save the modified DfltCustomization file and upload it back to the ASA.
c:\>pscp.exe DfltCustomization asaadmin@ciscoasa:disk0:/DfltCustomization asaadmin@ciscoasa's password: DfltCustomization | 9 kB | 9.6 kB/s | ETA: 00:00:00 | 100%
Then import the modified customization object from the ASA command line.
ciscoasa(config)# import webvpn customization DfltCustomization disk0:/DfltCustomization %INFO: customization object 'DfltCustomization' was successfully imported
Add the Duo LDAP server. To do this, create the LDAP AAA Server Group.
ciscoasa(config-aaa-server-group)# aaa-server Duo-LDAP protocol ldap
Then, add the Duo LDAP server, using your external, internet-facing interface and the following integration information:
Host Your API hostname (i.e.
Server Port 636 Timeout 60 Base DN dc=INTEGRATION_KEY,dc=duosecurity,dc=com Login DN dc=INTEGRATION_KEY,dc=duosecurity,dc=com Login Password SECRET_KEY Naming Attribute(s) cn LDAP over SSL enable
ciscoasa(config-aaa-server-group)# aaa-server Duo-LDAP (outside) host api-xxxxxxxx.duosecurity.com ciscoasa(config-aaa-server-host)# server-port 636 ciscoasa(config-aaa-server-host)# timeout 60 ciscoasa(config-aaa-server-host)# ldap-base-dn dc=DIXXXXXXXXXXXXXXXXXX,dc=duosecurity,dc=com ciscoasa(config-aaa-server-host)# ldap-login-dn dc=DIXXXXXXXXXXXXXXXXXX,dc=duosecurity,dc=com ciscoasa(config-aaa-server-host)# ldap-login-password ************ ciscoasa(config-aaa-server-host)# ldap-naming-attribute cn ciscoasa(config-aaa-server-host)# ldap-over-ssl enable ciscoasa(config-aaa-server-host)# exit
Edit the SSL VPN Connection Profile so that the Duo-LDAP server is used for secondary authentication. (In the example below the connection profile is called “VPNConnectionProfile”).
ciscoasa(config)# tunnel-group VPNConnectionProfile general-attributes ciscoasa(config-tunnel-general)# secondary-authentication-server-group Duo-LDAP use-primary-username INFO: This command applies only to SSL VPN - Clientless and AnyConnect. ciscoasa(config-tunnel-general)# exit
If your users log in with the AnyConnect desktop or mobile clients increase the authentication timeout in the AnyConnect profile. This will give users enough time to approve the Duo authentication request.
First, download the AnyConnect Client Profile XM file (normally called “DefaultProfile.xml”).
c:\>pscp.exe asaadmin@ciscoasa:disk0:DefaultProfile.xml .\DefaultProfile.xml asaadmin@ciscoasa's password: DefaultProfile.xml | 2 kB | 2.0 kB/s | ETA: 00:00:00 | 100%
Edit the downloaded XML file add change the AuthenticationTimeout to 60 seconds. The edit should be as follows:
Save the modified AnyConnect XML connection profile file and upload it back to the ASA.
c:\>pscp.exe DefaultProfile.xml asaadmin@ciscoasa:disk0:/DefaultProfile.xml asaadmin@ciscoasa's password: DefaultProfile.xml | 2 kB | 2.0 kB/s | ETA: 00:00:00 | 100%