Always-On VPN
This policy defines which VPN app stays permanently active on the device.
The Always-On VPN policy determines which already installed VPN app should stay permanently active on an Android Enterprise device. Unlike the StrongSwan configurations →, which equip a specific VPN app with its own profile, this policy only selects which app acts as the always-on VPN – the app itself must be installed separately via Manage apps →, since it is not deployed automatically by this policy.
Configuration
The Always-On VPN settings can be changed by the user on the device, unless the Disable VPN configuration option is enabled in the Restrictions →.
The fields are located in the Always-On VPN card in the General section of the form. The configuration can only be added once per policy. If several policies of a device contain the configuration, only the one from the policy with the highest priority → applies.
- Deny networking when VPN is not connected (lockdown mode): permits network traffic exclusively through the VPN connection. As long as the VPN is not connected, no network access is available. Even while the VPN is connected, any traffic outside the tunnel remains blocked unless the respective app is exempted as a lockdown exemption →. Disabled by default. When the toggle is enabled, the form shows a warning above it (see below).
- Select Always-On VPN app (required, Select button): the app that should remain permanently active as the VPN connection. Select opens the Select an app dialog (see below). The selected app is shown with its name below the button and is removed via the icon in its entry; a new selection replaces it. Only the package name of the app is transferred to the device. Without a selected app, Save is not enabled.
In the Select an app dialog, the following sources are available in the Source step; in the App step, exactly one app is selected or entered and adopted with Add:
- Relution App Store app: store apps for Android from the Relution App Store with at least one version in the Release status. APK apps uploaded to the Relution App Store are not offered.
- Managed Google Play Store App (Android Enterprise): an app is searched for in the embedded Managed Google Play Store. Selecting an app closes the dialog and adopts the app. This source is only offered if Android Enterprise is set up in the organization.
- Manually add app: Name and Internal name are entered, both are required. Internal name takes the package name. It consists of at least two parts separated by periods, each starting with a letter and containing only letters, digits and underscores, for example
com.example.vpn.
Example: Mandatory VPN for company devices
Company devices should communicate exclusively via the company VPN, and users should not be able to change the VPN settings. The company’s VPN app with the package name com.example.vpn is already included in the policy via Manage apps →. The Always-On VPN configuration is set up as follows:
- Deny networking when VPN is not connected: enabled
- Select Always-On VPN app: source Manually add app, Name
Company VPN, Internal namecom.example.vpn
In addition, the Disable VPN configuration option is enabled in the Restrictions →.
After the policy has been applied, the app is set as the always-on VPN on the device, and the user cannot change the VPN settings. As long as no VPN connection exists, apps without Exemption have no network access.
Split Tunneling
The Always-On VPN policy only determines which VPN app stays permanently active. Which traffic is routed through the tunnel is determined by the configuration of the VPN app or the VPN gateway. If it does not restrict the tunnel to specific apps or destination networks, Android routes all traffic through the VPN.
Split tunneling is therefore also possible in combination with Always-On VPN, provided the VPN app supports it:
- App configuration of the VPN app: If the vendor offers a managed configuration, it is available in Manage apps → via the Configuration action. Whether and how apps or networks can be defined for the tunnel there depends on the respective VPN client.
- StrongSwan: In the StrongSwan VPN Profile →, the Applications section offers the choice between Only these Apps will use the VPN and These Apps will not use the VPN (default). If the list remains empty with These Apps will not use the VPN, all apps use the VPN. In the Split tunneling section, traffic can additionally be split by destination network: Only route traffic to specific subnets via VPN, everything else is routed as if there was no VPN or Traffic to these subnets will not be routed via VPN. Optionally, Block IPv4 traffic not destined for the VPN and Block IPv6 traffic not destined for the VPN block the remaining traffic of the respective protocol version.
- VPN gateway: Alternatively, the gateway pushes only the internal networks as routes to the device instead of tunneling all traffic.
Lockdown Mode and Exemptions
With lockdown mode enabled, Android blocks any traffic that does not pass through the VPN. Apps excluded from the tunnel via split tunneling have no network connection in this case. The same applies to traffic to destination networks for which the VPN does not provide a route. Split tunneling based solely on destination networks is therefore not usable with lockdown mode enabled. This also applies to splitting by subnets in the Split tunneling section of the StrongSwan VPN Profile.
Individual apps can be exempted from lockdown. To do so, the VPN always on lockdown exemption option is set in Manage apps → via the Advanced action:
- Unspecified / Enforce – the app is subject to lockdown mode.
- Exemption: the app may communicate even without an active VPN connection. This setting is supported as of Android 10.
The option is not available for APK apps from the Relution App Store. For these apps, Advanced only contains the option User app uninstallation mode.
An exempted app continues to use the VPN as long as the VPN app includes it in the tunnel. For an app to communicate outside the tunnel while lockdown mode is enabled, it must therefore be marked as Exemption and also be excluded from the tunnel in the VPN app.
Support
- Managed devices (Device Owner)
- COPE work profile (Personal Profile Enabled)
- Work profile (Profile Owner/BYOD)