Configure AlwaysOn VPN before Windows logon

AlwaysOn VPN before Windows logon provides the following capabilities.

  • Administrator provides a one-time password to the first time users working remotely using which users can connect to domain controller to change their password.
  • Administrator remotely manages/enforces AD policies to the device even before the user logs in.
  • Administrator provides a granular level of control to users based on the user group after the user logs on. For example, using user-level tunnel, you can restrict or provide access for a resource to a particular user group.
  • The user tunnel can be configured for MFA as per user requirements.
  • Same machine can be used by multiple users, the access to selective resources are provided based on the user profile. For example in kiosk, a machine can be used by multiple users without hassle.
  • Users working remotely connect to domain controller to change their password.

Understanding AlwaysOn VPN before Windows logon

The following is the flow of events for the AlwaysOn VPN before Windows logon functionality.

Alwayson with user personal flow

  • User turns on the laptop, machine-level tunnel is established towards Citrix Gateway using device certificate as identity.
  • User logs in to the laptop with AD credentials.
  • Post login, user is challenged with MFA.
  • Upon a successful authentication machine-level tunnel is replaced with a user-level tunnel.
  • Once user logs out, the user-level tunnel is replaced with the machine-level tunnel.

Configure AlwaysOn VPN before Windows logon by using Classic Policy

To configure AlwaysOn VPN before Windows logon using Classic Policy, see Configure Always On VPN before Windows logon using Classic Policy.

Configure AlwaysOn VPN before Windows logon by using Advanced Policy

Prerequisite

  • Citrix Gateway and VPN plug-in must be version 13.0.41.20 and later.
  • Citrix ADC Advanced Edition and higher is required for the solution to work.
  • You can configure the functionality only by using advanced policies.

The configuration involves the following high-level steps:

  • Create an authentication profile
  • Create an authentication virtual server
  • Create authentication policies
  • Bind the policies to the authentication profile

To configure the functionality using the GUI

Client certificate based authentication

  1. On the Configuration tab, navigate to Citrix Gateway > Virtual Servers.
  2. On the Citrix Gateway Virtual Servers page, select an existing virtual server and click Edit.
  3. On the VPN Virtual Server page, click the edit icon.
  4. Click Add next to the CA for Device Certificate section and click OK.

    Add ca for device certificate

    Note: Do not select the Enable Device Certificate check box.

  5. For binding a CA certificate to the virtual server, click CA certificate under Certificate section. Click Add Binding under SSL Virtual Server CA Certificate Binding page.

    Note: All CA certificates (Root and Intermediate) that can potentially sign the Device Certificate issued to clients must be bound under the CA for Device Certificate section and also the CA Certificate binding section for virtual server in Steps 4 and 5. For more information on linking CA certificate with intermediate / subordinate, see Install, link, and update certificates.

  6. Click the text, Click to select to select the required certificate.

    Add ca for device certificate

  7. Select the required CA certificate.

    Add ca for device certificate

  8. Click Bind.

  9. On the VPN Virtual Servers page, under Authentication Profile section, click Add.
  10. On the Create Authentication Profile page, provide a name for the authentication profile, and click Add. Create auth profile
  11. On the Authentication Virtual Server page, provide a name for the authentication virtual server, select IP Address Type as Non-Addressable, and click OK. Select nonaddressable IP type
  12. Under Advanced Authentication Policies, click inside Authentication Policy.
  13. On the Policy Binding page click Add next to Select Policy.
  14. On the Create Authentication Policy page;
    1. Enter a name for the advance authentication policy.
    2. Select EPA from the Action Type list.
    3. Click Add next to Action. Select EPA action type
  15. On the Create Authentication EPA Action page;
    1. Enter a name for the EPA action to be created.
    2. Enter sys.client_expr(“device-cert_0_0”) in the Expression field.
    3. Click Create.

    Create expression

  16. On the Create Authentication Policy page;
    1. Enter a name for the authentication policy.
    2. Enter is_aoservice in the Expression field.
    3. Click Create.

    Create expression2

  17. On the Policy Binding page, enter 100 in Priority and click Bind.

    Bind policy

    Note: The machine-level tunnel configuration is now complete. You can skip steps 18–25 and proceed with the client side configuration, if you do not want the user-level tunnel after Windows logon.

    To replace a machine-level tunnel with a user-level tunnel after Windows logon, continue with the following configuration.

  18. Change the Goto Expression to Next instead of End for the policy bound in step 17.

    Bind policy

  19. On the Authentication Virtual Server page, click inside Authentication Policy.
  20. On the Authentication Policy page, click the Add Binding tab.
  21. On the Policy Binding page, click Add next to Select Policy. Bind policy2
  22. On the Create Authentication Policy page;
    1. Enter a name for the “no authentication” policy to be created.
    2. Select action type as No_AUTHN.
    3. Enter is_aoservice.not in the Expression field.
    4. Click Create.

      Note: The expression is_aoservice.not is valid from Citrix Gateway version 13.0 build 41.20 and later.

    Select noauth action type

  23. On the Policy Binding page, enter 110 in Priority, click Add next to Select Next Factor.
  24. On Authentication Policy Label page, create LDAP authentication policy. Refer to the following article to create LDAP authentication policy. For more details see To configure LDAP authentication by using the configuration utility.

  25. Upon successful creation of LDAP authentication policy, click Bind on the Policy Binding page.

Client side configuration

AlwaysOn, locationDetection, and suffixList registries are optional and only required if the location detection functionality is needed.

To access registry key entries, navigate to the following path: Computer>HKEY_LOCAL_MACHINE>SOFTWARE>Citrix>Secure Access Client

Registry key Registry type Values and description
AlwaysOnService REG_DWORD 1 => Establish machine level tunnel but not user level tunnel; 2 => Establish machine level tunnel and user level tunnel
AlwaysOnURL REG SZ URL of the Citrix Gateway virtual server user wants to connect to. Example: https://xyz.companyDomain.com
AlwaysOn REG_DWORD 1 => Allow network access on VPN failure; 2=> Block network access on VPN failure
locationDetection REG_DWORD 1 => To enable location detection; 0 => To disable location detection
suffixList REG SZ Comma separated list of intranet domains. Used when location detection is enabled
ClientControl REG_DWORD 1 => Allow users to log out or connect to other gateways. 0 => Block users to log out or connect to other gateways

For more information about these registry entries, see AlwaysOn.