Remote Access VPN with Pre-Logon
Pre-logonis a connect method that establishes a VPN tunnel before a user logs in. The purpose of pre-logon is to authenticate the endpoint (not the user) and enable domain scripts or other tasks to run as soon as the endpoint powers on. Machine certificates enable the endpoint to establish a VPN tunnel to the GlobalProtect gateway. A common practice for IT administrators is to install the machine certificate while staging the endpoint for the user.
A pre-logon VPN tunnel has no username association because the user has not logged in. To allow endpoints to access resources in the trust zone, you must create security policies that match the pre-logon user. These policies should allow access to only the basic services for starting up the system, such as DHCP, DNS, Active Directory (for example, to change an expired password), antivirus, or operating system update services. After the user authenticates to the gateway, the GlobalProtect app reassigns the VPN tunnel to that user (the IP address mapping on the firewall changes from the pre-logon endpoint to the authenticated user).
The GlobalProtect Credential Provider logon screen for Windows 7 and Windows 10 endpoints also displays the pre-logon connection status prior to user login, which allows end users to determine whether they can access network resources upon login. If the GlobalProtect app detects an endpoint as internal, the logon screen displays the
Internalpre-logon connection status. If the Globalprotect app detects an endpoint as external, the logon screen displays the
Not Connectedpre-logon connection status.
Windows endpoints behave differently from macOS endpoints with pre-logon. With macOS endpoints, the pre-logon tunnel is torn down, and then a new tunnel is created when the user logs in.
When a user requests a new connection, the portal authenticates the user through an authentication profile. The portal can also use an optional certificate profile that validates the client certificate (if the configuration includes a client certificate). In this case, the certificate must identify the user. After authentication, the portal determines if the endpoint’s GlobalProtect configuration is current. If the portal’s configuration has changed, it pushes an updated configuration to the endpoint.
If the configuration on the portal or a gateway includes cookie-based authentication, the portal or gateway installs an encrypted cookie on the endpoint. Subsequently, the portal or gateway uses the cookie to authenticate users and refresh the agent configuration. If an agent configuration profile includes the pre-logon connect method in addition to cookie-authentication, the GlobalProtect components can use the cookie for pre-logon.
If users never log in to an endpoint (for example, a headless endpoint) or a pre-logon connection is required on a system that a user has not previously logged in to, you can let the endpoint initiate a pre-logon tunnel without first connecting to the portal to download the pre-logon configuration. To do this, you must override the default behavior by creating entries in the Windows Registry or macOS plist.
The GlobalProtect endpoint will then connect to the portal specified in the configuration, authenticate the endpoint by using its machine certificate (as specified in a certificate profile configured on the gateway), and then establish the GlobalProtect connection. When the end-user subsequently logs in to the machine, and if single sign-on (SSO) is enabled in the agent configuration, the username and password are captured when the user logs in. If SSO is not enabled in the agent configuration, or SSO is not supported on the endpoint (for example, a macOS system) the user’s credentials must be stored in the app (the
Save User Credentialsoption must be set to
Yes). After successful authentication to the gateway, the tunnel is renamed (Windows) or rebuilt (macOS), and user and group-based policy can be enforced.
This example uses the GlobalProtect topology shown in GlobalProtect VPN for Remote Access.
- Use thedefaultvirtual router for all interface configurations to avoid having to create inter-zone routing.
- For this example, select thetab, and then configure the following settings:NetworkInterfacesEthernet
- SelectLayer 3from theInterface Typedrop-down.
- On theConfigtab,Assign interface tothe defaultVirtual Routerand thel3-untrustSecurity Zone.
- On theIPv4tab, clickAddto select the203.0.113.1IP address (or the object that maps203.0.113.1) or add aNew Addressto create a new object and address mapping (leave the address type asStatic). For example, create a DNS “A” record that maps IP address203.0.113.1togp.acme.com.
- SelecttoNetworkInterfacesTunnelAdda new tunnel interface.
- For theInterface Name, entertunnel.2.
- On theConfigtab,Assign Interface Toa newSecurity Zonecalledcorp-vpnand the defaultVirtual Router.
- Enable User Identification on thecorp-vpnzone.
- Create the security policy rules.This configuration requires the following policies ():PoliciesSecurity
- Adda rule that enables pre-logon users access to basic services that are required for the endpoint to come up, such as authentication services, DNS, DHCP, and Microsoft Updates.
- Adda rule to deny pre-logon users access to all other destinations and applications.
- Addany additional rules to enable different users or user groups access to specific destinations and applications. Follow the Best Practice Internet Gateway_Security_Policy recommendations for creating these rules.
- Use one of the following methods to obtain a server certificate for the interface that is hosts the GlobalProtect portal and gateway:Selectto manage certificates with the following criteria:DeviceCertificate ManagementCertificates
- Obtain a server certificate. Because the portal and gateway are on the same interface, the same server certificate can be used for both components.
- The CN of the certificate must match the FQDN,gp.acme.com.
- To enable endpoints to connect to the portal without receiving certificate errors, use a server certificate from a public CA.
- Generate a machine certificate for each endpoint that connects to GlobalProtect, and then import the certificate into the personal certificate store on each machine.Although you can generate self-signed certificates for each endpoint, as a best practice, use your own public-key infrastructure (PKI) to issue and distribute certificates to your endpoints.
- Install certificates in the personal certificate store on the endpoints. (Local Computer store on Windows endpoints or System Keychain on macOS endpoints)
- Import the trusted root CA certificate from the CA that issued the machine certificates onto the portal and gateway(s).You do not have to import the private key.
- Download the CA certificate in Base64 format.
- Use the following steps to import the certificate onto each firewall that hosts a portal or gateway:
- SelectandDeviceCertificate ManagementCertificatesDevice CertificatesImportthe certificate.
- Enter aCertificate Namethat identifies the certificate as your client CA certificate.
- Browsefor theCertificate Filethat you downloaded from the CA.
- Set theFile FormattoBase64 Encoded Certificate (PEM).
- ClickOKto save your certificate.
- On theDevice Certificatestab, select the certificate that you just imported.
- Select the check box forTrusted Root CA, and then clickOK.
- On each firewall that hosts a GlobalProtect gateway, create a certificate profile to identify the CA certificate for validating the machine certificates.If you plan to use client certificate authentication to authenticate users when they log in to the system, make sure that the CA certificate that issues the client certificates is referenced in the certificate profile in addition to the CA certificate that issued the machine certificates (if they are different).
- SelectandDeviceCertificatesCertificate ManagementCertificate ProfileAdda new certificate profile..
- Enter aNameto identify the profile, such asPreLogonCert.
- Set theUsername FieldtoNone.
- (Optional) If you also use client certificate authentication to authenticate users upon login, add the CA certificate that issued the client certificates if it is different from the one that issued the machine certificates.
- In theCA Certificatesfield,Addthe CA certificate.
- Select the Trusted RootCA Certificatethat you imported in step 5, and then clickOK.
- ClickOKto save the profile.
- See the topology diagram shown in GlobalProtect VPN for Remote Access.Although you must create a certificate profile for pre-logon access to the gateway, you can use either client certificate authentication or authentication profile-based authentication for logged in users. In this example, the same LDAP profile is used that is used to authenticate users to the portal.
- Select, and thenNetworkGlobalProtectGatewaysAddthe following gateway configuration:Interface—ethernet1/2IP Address—203.0.113.1Server Certificate—GP-server-cert.pem issued by GoDaddyCertificate Profile—PreLogonCertAuthentication Profile—Corp-LDAPTunnel Interface—tunnel.2IP Pool—10.31.32.3 - 10.31.32.118
- Committhe gateway configuration.
- Configure the GlobalProtect Portals.Configure theDevicedetails (networking parameters, authentication service profile, and certificate for the authentication server).Select, and thenNetworkGlobalProtectPortalsAddthe following portal configuration:Interface—ethernet1/2IP Address—203.0.113.1Server Certificate—GP-server-cert.pem issued by GoDaddyCertificate Profile—NoneAuthentication Profile—Corp-LDAP
- Define the GlobalProtect Agent Configurations for pre-logon users and for logged in users.Use a single configuration if you want pre-logon users to access the same gateways before and after they log in.To direct pre-logon users to different gateways before and after they log in, create two configuration profiles. In this first configuration’sUser/User Group, select thepre-logonfilter. With pre-logon, the portal first authenticates the endpoint (not the user) to set up a connection even though the pre-logon parameter is associated with the user. Subsequently, the portal authenticates the user when he or she logs in.After the portal authenticates the user, it deploys the second configuration. In this case,User/User Groupisany.As a best practice, enable SSO in the second configuration so that the correct username is immediately reported to the gateway when the user logs in to the endpoint. If SSO is not enabled, the saved username in theAgentsettings panel is used.Select theAgenttab of theGlobalProtect Portal Configurationwindow (), and thenNetworkGlobalProtectPortals<portal-config>Addone of the following configurations:
Use single sign-on—enabledConnect Method—pre-logonExternal Gateway Address—gp1.acme.comUser/User Group—anyAuthentication Override—Cookie authentication for transparently authenticating users and for configuration refresh
- Use the same gateway before and after pre-logon users log in:
First Agent Configuration:Connect Method—pre-logonExternal Gateway Address—gp1.acme.comUser/User Group—pre-logonAuthentication Override—Cookie authentication for transparently authenticating users and for configuration refreshSecond Agent Configuration:Use single sign-on—enabledConnect Method—pre-logonExternal Gateway Address—gp2.acme.comUser/User Group—anyAuthentication Override—Cookie authentication for transparently authenticating users and for configuration refreshMake sure the pre-logon configuration is first in the list of configurations. If it is not, select it and clickMove Up.
- Use separate gateways for pre-logon users before and after they log in:
- Save the GlobalProtect configuration.ClickCommit.
- (Optional) If users never log in to an endpoint (for example, a headless endpoint), or a pre-logon connection is required on an endpoint that users have not previously logged in to, create thePrelogonregistry entry on the endpoint.You must also pre-deploy the default portal IP address.For more information about registry settings, see Deploy App Settings Transparently.
- Go to the following Windows Registry location to view the list of GlobalProtect settings:HKEY_LOCAL_MACHINE\SOFTWARE\Palo Alto Networks\GlobalProtect\PanSetup
- Selectto create the following registry entries:EditNewString Value
- Create aString ValuenamedPrelogonwith a value of1. This setting enables GlobalProtect to initiate a connection before the user logs in to the endpoint.
- Create aString ValuenamedPortalthat specifies the IP address or hostname of the default portal for the GlobalProtect endpoint.