Anyconnect Could Not Connect To Secure Gateway



Please choose another gateway and try again. Function: ConnectIfc::connect File: ConnectIfc.cpp Line: 661 Non-Cisco gateway detected. The first connection when the AC profile is not present on the client succeeds without any issues. If you are running Cisco AnyConnect and you keep getting this message. Reconnect is just useless. One of the possibilities is you have shared your network adapter. You need to disable the share.

This article refers to the Cisco AnyConnect VPN. If you're looking for information on the Prisma Access VPN Beta that uses the GobalConnect app, see: Prisma Access VPN Landing Page.
If you're not sure which service you're using, see: How do I know if I'm using the Cisco AnyConnect VPN or the Prisma Access VPN?

What should be done when an attempt to connect to VPN using Cisco AnyConnect generates this message: AnyConnect was not able to establish a connection to the specified secure gateway. Please try connecting again.

In the Windows Control Panel navigate to Internet options (Network and Internet Connections, and then Internet Options)

Once there, the user will need to select the Connections tab, and then LAN Settings. Make sure the option 'Use automatic configure script' is unchecked, reboot, and then retry Cisco AnyConnect.

This post describes how to configure the Cisco ASA and AnyConnect VPN to use the Start-Before Logon (SBL) feature. This allows the user to connect to the VPN before logging onto Windows, thus allowing login scripts and Windows Group Policies to be applied.

Create/Modify the AnyConnect Profile

Secure
  • Open the AnyConnect VPN Profile Editor
  • Open the existing VPN Profile or create a new file
  • Under VPN > Preferences (Part 1) select User Start Before Logon
  • Ensure the Certificate Store is All
Anyconnect Could Not Connect To Secure Gateway
  • If creating a new profile navigate to Server List
  • Click Add to define a new server
  • Define the Display Name (required)
  • Define the FQDN or IP Address
  • Select the Primary Protocol

Cisco Anyconnect Gateway Error

  • Save the AnyConnect Profile to the local computer, named appropriately e.g. RAS.xml

ASA Configuration

  • Copy the AnyConnect Profile RAS.xml to the ASA, with a Profile Name of RASProfile
  • Modify the Group Policy in use by the tunnel-group and reference the AnyConnect Profile previously created.
  • Modify the Group Policy in use by the tunnel-group and enable SBL vpngina
  • Save the ASA configuration

Testing/Verification

  • Connect to the VPN tunnel, upon first connection the client should detect that SBL has been enabled and automatically download
  • It will automatically install
  • Reboot the computer
  • After reboot the SBL icon should be visible at the login prompt, at the bottom right of the screen
  • Press the button and wait to be prompted for authentication

If connected to the VPN successfully you will notice the Disconnect button appear at the bottom right of the login screen. You should now be able to login to the computer as normal with full network connectivity, dependant on an ACL (DACL or VPN Filter) applied to the VPN session.

Cisco

Troubleshooting

AnyConnect Client Downloads

Anyconnect secure gateway error

Make sure the Local AnyConnect VPN Policy permits downloads of client, otherwise you will receive the following error “Automatic profile updates are disabled and the local VPN profile does not match the secure gateway VPN profile.”

If you receive this error run the AnyConnect Profile Editor – VPN Local Policy application

Cisco Anyconnect Unable To Connect

  • Open the file C:ProgramDataCiscoCisco AnyConnect Secure Mobility ClientAnyConnectLocalPolicy.XML
  • Untick the box Bypass Downloader
  • Alternatively edit the same file in notepad an change to <BypassDownloader>false<BypassDownloader>

ASA Identity Certificate

You must ensure that the Windows client trusts the certificate presented to the client as part of the authentication process. If you receive a certificate error when connecting to the VPN normally, you will be unable to connect using SBL.

If you attempt to connect to the VPN using SBL with an invalid certificate on the ASA or the Windows client does not trust the certificate you will receive the following error:- “AnyConnect cannot confirm it is connected to your secure gateway“. It does NOT present the option to Connect Anyway.

This post describes how to configure a CA Trustpoint on the ASA and install the identity certificate and root certificate.

After installing the certificate on the ASA, connect to the VPN and confirm you do not receive any certificate warnings before attempting to connect using SBL.

Machine Certificate

If the tunnel-group is configured to use certificate or aaa + certificates authentication, ensure the Windows computer has a Machine Certificate. Without a machine certificate you will receive the following error: – “No valid certificates available for authentication”.

Connect

Certificate Store

If the tunnel-group is configured to use certificate or aaa + certificates authentication, the AnyConnect Profile must be configured to check All Certificate Store (as mentioned in the previous configuration section) for SBL to work.

If you connect to the SBL and the AnyConnect client does not check the Machine Store, you will receive the error “Certificate Validation Failure“.