Citrix Gateway

Configure Always On VPN before Windows Logon

Always On 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 the 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 a 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.
  • Multiple users can use the same machine. Access to selective resources are provided based on the user profile. For example multiple users can use a machine in a kiosk without hassle.
  • Users working remotely connect to the domain controller to change their password.

Understanding Always On VPN before Windows Logon

The following is the flow of events for the Always On VPN before Windows Logon functionality.

Always On with user personal flow

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

Configure Always On VPN before Windows Logon by using an 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

Important:

If the VPN virtual server on the Citrix Gateway appliance is configured on a nonstandard port (other than 443), the machine-level tunnel does not work as intended.

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 the SSL Virtual Server CA Certificate Binding page.

    Note:

    • The device certificate’s subject common name (CN) field must not be empty. If a device tries to log in with empty CN device certificates, its VPN session is created with the user name as “anonymous”. In IIP, if multiple sessions have the same user name, previous sessions are disconnected. So, when IIP is enabled, you notice the functionality impact because of an empty common name.
    • 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 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 authentication 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 the 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 the 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 no authentication action type

  23. On the Policy Binding page, enter 110 in Priority. Click Add next to Select Next Factor. Add the next factor
    1. In the Authentication Policy Label page, create a policy label and click Continue. Add an authentication policy label
    2. In Select Policy, click Add and create an LDAP authentication policy. Add an LDAP policy
    3. Click Create, and then click Bind.
    4. Click Done, and then click Bind.

    In the Authentication Policy page, the Next Factor column displays the configured next factor policy. Next factor sample

    Note:

    For details on creating an LDAP authentication policy, see To configure LDAP authentication by using the configuration utility.

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 the user wants to connect to. Example: https://xyz.companyDomain.com Important: Only one URL is responsible for machine level tunnel and user-level tunnel. The AlwaysOnURL registry helps both the service and user-level component to work and connect a separate tunnel, that is, machine-level tunnel and user-level tunnel based on the design
AlwaysOn REG_DWORD 1 => Allow network access on VPN failure; 2=> Block network access on VPN failure
AlwaysOnWhiteList REG_SZ Semi-colon separated list of IP addresses or FQDNs which must be whitelisted while the machine is running under the strict mode. Example: 8.8.8.8;linkedin.com
UserCertCAList REG_SZ Comma or semi-colon separated list of root CA names, that is the issuer name of the certificate. Used in the context of an Always On service where a customer can specify the list of CAs to choose the client certificate from. Example: cgwsanity.net;xyz.gov.in
locationDetection REG_DWORD 1 => To enable the location detection; 0 => To disable the location detection
suffixList REG SZ Comma separated list of domains and is responsible for checking if the machine is in intranet or not at any given time when location-detection is enabled. Example: citrite.net,cgwsanity.net

For more information about these registry entries, see Always On.

Configure Always On VPN before Windows Logon