You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tutorial explains how to deploy the Cloudflare WARP client on Linux devices using a service token and an installation script. This deployment workflow is designed for headless servers which do not have access to a browser for identity provider logins. Because users are not required to log in to an identity provider, identity-based policies and logging will not be available on these devices.
11
+
This tutorial explains how to deploy the Cloudflare WARP client on Linux devices using a service token and an installation script. This deployment workflow is designed for headless servers - that is, servers which do not have access to a browser for identity provider logins - and for situations where you want to fully automate the onboarding process. Because devices will not register through an identity provider, [identity-based policies](/cloudflare-one/policies/gateway/identity-selectors/) and logging will be unavailable.
12
12
13
13
## Prerequisites
14
14
15
15
-[Cloudflare Zero Trust account](/cloudflare-one/setup/#create-a-zero-trust-organization)
16
16
17
17
## 1. Create a service token
18
18
19
-
A service token consists of a Client ID and a Client Secret. We will be using a service token to enroll the WARP client in your Zero Trust organization.
19
+
Fully automated deployments rely on a service token to enroll the WARP client in your Zero Trust organization. You can use the same token to enroll multiple devices, or generate a unique token per device if they require different [device profile settings](/cloudflare-one/connections/connect-devices/warp/configure-warp/device-profiles/).
Device enrollment permissions determine the users and devices that can register WARP with your Zero Trust organization.
28
+
29
+
To allow devices to enroll using a service token:
30
+
27
31
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **WARP Client**.
28
32
2. In **Device enrollment permissions**, select **Manage**.
29
33
3. In the **Policies** tab, select **Create new policy**. A new tab will open with the policy creation page.
30
34
4. For **Action**, select _Service Auth_.
31
-
5. For the **Selector** field, you have two options: you can either allow all service tokens (`Any Access Service Token`) or specific service tokens (`Service Token`). In this example, we will choose the token created earlier:
35
+
5. For the **Selector** field, you have two options: you can either allow all service tokens (`Any Access Service Token`) or specific service tokens (`Service Token`). For example:
32
36
33
37
| Rule Action | Rule type | Selector | Value |
34
38
| --------- | ---------| ------ | -- |
35
39
| Service Auth | Include | Service Token |`<TOKEN-NAME>`|
36
40
6. Save the policy.
37
-
7. Go back to **Device enrollment permissions** and add the newly created policy.
41
+
7. Go back to **Device enrollment permissions** and add the newly created policy to your permissions.
38
42
8. Select **Save**.
39
43
40
44
## 3. Create an installation script
@@ -51,13 +55,15 @@ You can use a shell script to automate WARP installation and registration. The f
echo"deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main"| sudo tee /etc/apt/sources.list.d/cloudflare-client.list
57
62
sudo apt-get update --assume-yes
58
63
sudo apt-get install --assume-yes cloudflare-warp
59
64
}
60
65
66
+
# Create an MDM file with your WARP deployment parameters
61
67
functionmdm() {
62
68
sudo touch /var/lib/cloudflare-warp/mdm.xml
63
69
cat > /var/lib/cloudflare-warp/mdm.xml << "EOF"
@@ -94,6 +100,8 @@ You can use a shell script to automate WARP installation and registration. The f
94
100
95
101
## 4. Install WARP
96
102
103
+
To install WARP using the example script:
104
+
97
105
1. Make the script executable:
98
106
99
107
```sh
@@ -105,4 +113,4 @@ You can use a shell script to automate WARP installation and registration. The f
105
113
sudo ./install_warp.sh
106
114
```
107
115
108
-
The script will install WARP and apply the configuration parameters stored in `/var/lib/cloudflare-warp/mdm.xml`. Assuming [`auto_connect`](/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/parameters/#auto_connect) is configured, WARP will automatically connect to your Zero Trust organization. The device will appear in [Zero Trust](https://one.dash.cloudflare.com) under **My Team** > **Devices**.
116
+
WARP is now deployed with the configuration parameters stored in `/var/lib/cloudflare-warp/mdm.xml`. Assuming [`auto_connect`](/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/parameters/#auto_connect) is configured, WARP will automatically connect to your Zero Trust organization. Once connected, the device will appear in [Zero Trust](https://one.dash.cloudflare.com) under **My Team** > **Devices**.
0 commit comments