Cloudflare WARP is an overlay network just like ZeroTier and Tailscale but instead of peer-to-peer, you connect to the nearest Cloudflare PoP using WireGuard.
Finally, a free site-to-site VPN from Cloudflare.
Because Cloudflare WARP uses WireGuard, we can run Cloudflare WARP Connector on any devices that can run WireGuard.
Cloudflare Zero Trust settings
Cloudflare WARP-to-WARP
- Go to Team & Resources → Devices → Management.
- Enable “Allow all Cloudflare One traffic to reach enrolled devices”.
Let Cloudflare assign the WARP-to-WARP IPv4 range to devices
Instead of getting the same IP address of 172.16.0.2 to every device, we instead enable “Override local interface IP” so that devices get their own unique IP from 100.96.0.0/12.
- Go to Team & Resources → Devices → Management.
- Enable “Assign a unique IP address to each device”.
Configure Split Tunneling
This allows Cloudflare WARP-to-WARP traffic to pass though the WireGuard instead of getting handled as local traffic.
- Go to Team & Resources → Devices → Device profiles.
- Click Default profile → Edit.
- Make sure split tunnels is set to Exclude IPs and domains.
- Click “Manage” on Split Tunnels.
- Remove IP range
100.64.0.0/10. - Add IP range
100.64.0.0/11and100.112.0.0/12. (Optional)
Create a separate device profile for WARP Connector
To ensure that WARP Connector clients will only get a WireGuard configuration instead of a MASQUE configuration.
- Go to Team & Resources → Devices → Device profiles.
- Duplicate the Default profile.
- Name the profile “WARP Connector”.
- On the “Build an expression”, set
“User email iswarp_connector@<your-team-name>.cloudflareaccess.com”. - Make sure the Device tunnel protocol is set to WireGuard.
- Click “Save profile”.
Create WARP Connector tunnel
- Go to Networks → Connectors.
- Click Create a tunnel.
- Select WARP Connector.
- Make sure all prerequisites are enabled, and then next step.
- Name your tunnel, and then Create tunnel.
- Copy the WARP Connector token at step 3 that starts with
eyJhIjoi, and then click next step. - Click Return to Tunnels.
Generate Cloudflare WARP Connector WireGuard configuration
- Open a terminal with Docker installed. It is recommended to use GitHub Codespaces if you have a GitHub account.
- Using wgcf-connector, enter this command in terminal, replacing
<token>with the token you copied earlier that starts witheyJhIjoi.
| |
The program will output a file wgcf-connector-<registration_id>.conf in your current working directory with contents like this:
| |
Now you can use that WireGuard configuration to any devices that can use WireGuard in order to connect to Cloudflare Zero Trust.