|
| 1 | +--- |
| 2 | + |
| 3 | +pcx_content_type: how-to |
| 4 | +title: Set up Private Network Load Balancing with WARP |
| 5 | +sidebar: |
| 6 | + order: 4 |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +To use Private Network Load Balancing, you must first set up a Cloudflare Tunnel and a Virtual Local Area Network in the [Cloudflare Zero Trust Dashboard](http://one.dash.cloudflare.com). This guide walks you through all required steps, from setup to optional configurations. |
| 11 | + |
| 12 | +## 1. Create Tunnel and Virtual Network |
| 13 | + |
| 14 | +Skip to [step 2](/load-balancing/private-network/warp/#2-create-load-balancer-pools) if you already have a Cloudflare Tunnel and Virtual Network created. |
| 15 | + |
| 16 | +### 1.1 Create a Cloudflare Tunnel |
| 17 | + |
| 18 | +1. Log in to the [Zero Trust dashboard](http://one.dash.cloudflare.com). |
| 19 | +2. Go to **Networks** > **Tunnels**. |
| 20 | +3. Select **Create a tunnel**. |
| 21 | +4. Choose **Cloudflared** for the connector type. |
| 22 | +5. Enter a name for your tunnel. We suggest choosing a name that reflects the type of resources you want to connect through this tunnel (for example, `enterprise-VPC-01`). |
| 23 | +6. Select **Save tunnel**. |
| 24 | +7. Next, make sure the environment under **Choose your environment** matches your operating system, then copy the provided command, paste it into your terminal, and run it to install and launch `cloudflared`. |
| 25 | +8. Once the command has finished running, your connector will appear in the Zero Trust dashboard. |
| 26 | + |
| 27 | +For more details, refer to the [Create tunnel](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/) documentation. |
| 28 | + |
| 29 | +### 1.2 Create a Virtual Network |
| 30 | + |
| 31 | +1. In the [Zero Trust dashboard](http://one.dash.cloudflare.com), go to **Settings** > **WARP Client**. |
| 32 | +2. Under **Network locations**, find **Virtual networks** settings. |
| 33 | +3. Select **Add new** or **Manage** > **Create virtual network**. |
| 34 | +4. Name your virtual network and select **Save**. |
| 35 | +5. To assign the virtual network to the tunnel go to **Networks** > **Tunnels**. |
| 36 | +2. Select the tunnel created in the previous steps and select **Edit**. |
| 37 | +3. Under **Private Network**, select **Add a private network**. |
| 38 | +4. Enter the CIDR IP range for your private network. |
| 39 | +5. Under **Additional settings**, select the virtual network you created. |
| 40 | +6. Select **Save private network**. |
| 41 | + |
| 42 | +For more details, refer to the [Virtual Network](/cloudflare-one/connections/connect-networks/private-net/cloudflared/tunnel-virtual-networks/) documentation. For API-specific details, refer to the [virtual networks](/api/resources/zero_trust/subresources/networks/subresources/virtual_networks/) API documentation. |
| 43 | + |
| 44 | +The Tunnel and Virtual Network can be found under **Settings** > **WARP Client** in the Zero Trust dashboard. |
| 45 | + |
| 46 | +## 2. Create Load Balancer Pools |
| 47 | + |
| 48 | +Load Balancer Pools are logical groupings of endpoints — typically organized by physical datacenter or geographic region. The endpoints in the pool are the destinations where traffic is ultimately routed. |
| 49 | + |
| 50 | +:::note |
| 51 | +If your endpoint address is an RFC 1918 private IP address, you must assign a Virtual Network (VNET) that includes the corresponding CIDR range. |
| 52 | +::: |
| 53 | + |
| 54 | +Pools can be created using either the Cloudflare dashboard or the API. Refer to the [Create a pool](/load-balancing/pools/create-pool/#create-a-pool) documentation section for more information. |
| 55 | + |
| 56 | +## 3. Create an Account Load Balancer with a Private IP |
| 57 | + |
| 58 | +1. Go to **Load Balancing** at the account level and select **Create a Load Balancer**. |
| 59 | +2. Select **Private Load Balancer**. |
| 60 | +3. On the next step you can choose to associate this load balancer with either: |
| 61 | + - A CGNAT IP from the Cloudflare range or |
| 62 | + - A custom [RFC1918 address](https://datatracker.ietf.org/doc/html/rfc1918). |
| 63 | +4. Add a descriptive name to identify your Load Balancer. |
| 64 | +5. Proceed through the setup. |
| 65 | + |
| 66 | +After selecting an IP address and completing the setup, you will be redirected to the Load Balancing dashboard. You can locate your load balancer using the search bar or by filtering for **Private** load balancers. Be sure to note the assigned IP address as it will be required in the following steps. |
| 67 | + |
| 68 | +## 4. Make CGNAT IP routable (optional) |
| 69 | + |
| 70 | +If you are using an automatically assigned CGNAT IP address, you may need to update your Zero Trust settings to make this IP address accessible to WARP users. |
| 71 | + |
| 72 | +### Update Split Tunnel settings |
| 73 | + |
| 74 | +1. In Zero Trust, go to **Settings** > **WARP Client**. |
| 75 | +2. Under **Device settings**, find the [device profile](/cloudflare-one/connections/connect-devices/warp/configure-warp/device-profiles/) you would like to modify and select **Edit**. |
| 76 | +3. Under **Split Tunnels**, check whether your [Split Tunnels mode](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/split-tunnels/#change-split-tunnels-mode) is set to **Exclude** or **Include**. |
| 77 | +4. Select **Manage**. Depending on the mode: |
| 78 | + |
| 79 | +- Exclude Mode: Delete the `100.64.0.0/10` entry. |
| 80 | +- Include Mode: Add `100.64.0.0/10` as an allowed range. |
| 81 | + |
| 82 | +WARP traffic can now reach your Private Load Balancer at its CGNAT IP address. This traffic will be distributed over Tunnel to your private endpoints according to your configured steering method. |
| 83 | + |
| 84 | +## 5. FQDN override (optional) |
| 85 | + |
| 86 | +If you want your load balancer and its endpoints to be transparently accessible to users via a hostname, you can create an override that maps the hostname to the Load Balancer's IP address. This ensures that traffic destined for the hostname resolves to the correct IP. |
| 87 | + |
| 88 | +1. In **Gateway**, select **Firewall policies**. |
| 89 | +2. In the **DNS**** tab, create an override where the **Selector** equals `Host`, the **Operator** equals `is`, and the **Value** is the hostname you wish to associate with your load balancer. |
| 90 | +3. Set the **Action** to _Override_ and in **Override Hostname**, enter the IP address of your Private Load Balancer. |
| 91 | + |
| 92 | +Requests to the hostname will now resolve to your private load balancer. |
0 commit comments