Cloudflare Mesh (formerly WARP Connector) is an overlay network like ZeroTier and Tailscale but instead of peer-to-peer, you connect to the nearest Cloudflare PoP using WireGuard just like NordVPN Meshnet.
Finally, a free site-to-site VPN from Cloudflare.
Because Cloudflare Mesh uses WireGuard, we can run Cloudflare Mesh nodes on any devices that can run WireGuard.
Cloudflare Zero Trust settings
Cloudflare One traffic
- Go to Team & Resources → Devices → Management.
- Under “Mesh connectivity”, enable “Allow all Cloudflare One traffic to reach enrolled devices”.
Let Cloudflare assign the CGNAT IPv4 range to devices
Instead of getting the same IP address of 172.16.0.2 to every device, we instead enable “Assign a unique IP address to each device” so that devices get their own unique IP from 100.96.0.0/12.
- Go to Team & Resources → Devices → Management.
- Under “Global device client settings”, enable “Assign a unique IP address to each device”.
Configure Split Tunneling
This allows the Cloudflare Mesh 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 the Cloudflare Mesh nodes
To ensure that Cloudflare Mesh nodes 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 “Cloudflare Mesh”.
- 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 Cloudflare Mesh node
- Go to Networking → Mesh.
- Click Add node.
- Name your node, and then Continue.
- Copy the token at “Register & connect” that starts with
eyJhIjoiand ends withIn0=, and then click “I’ll connect later”. - Click “View node details”.
Generate Cloudflare Mesh 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 witheyJhIjoiand ends withIn0=.
| |
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 your Cloudflare Mesh private network.