Skip to content

Commit e1b5be0

Browse files
committed
user to site
1 parent 1a7695b commit e1b5be0

File tree

6 files changed

+125
-19
lines changed

6 files changed

+125
-19
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/private-net/warp-connector/site-to-internet.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ To connect a private network using `cloudflared`, refer to [Connect private netw
3838

3939
## 3. Route traffic from subnet to WARP Connector
4040

41+
Depending on where you installed the WARP Connector, you may need to configure other devices on the subnet to route outbound requests through WARP Connector.
42+
4143
### Option 1: Default gateway
4244

4345
<Render file="tunnel/warp-connector-default-gateway" />
@@ -48,12 +50,10 @@ To connect a private network using `cloudflared`, refer to [Connect private netw
4850

4951
#### Route from subnet to Internet
5052

51-
For example, for all traffic from laptop `10.0.0.2` to egress through WARP Connector, add a rule on the router that routes `0.0.0.0` to the WARP Connector host machine (`10.0.0.100`). When the laptop sends a request, the router will first redirect the traffic to the WARP Connector host. WARP Connector encrypts the traffic, changes its destination IP to the [WARP ingress IP](/cloudflare-one/connections/connect-devices/warp/deployment/firewall/#warp-ingress-ip), and sends it back to the router. The router will now forward this encrypted traffic to Cloudflare.
53+
For example, for all traffic from the subnet to egress through WARP Connector, add a rule on the router that routes `0.0.0.0` to the WARP Connector host machine (`10.0.0.100`).
5254

53-
:::note
55+
<Render file="tunnel/warp-connector-alternate-gateway-flow" />
5456

55-
Ensure that your routing rules do not forward the [WARP ingress IP](/cloudflare-one/connections/connect-devices/warp/deployment/firewall/#warp-ingress-ip) back to the WARP Connector.
56-
:::
5757
### Option 3: Intermediate gateway
5858

5959
<Render file="tunnel/warp-connector-intermediate-gateway" />
@@ -68,7 +68,7 @@ Ensure that your routing rules do not forward the [WARP ingress IP](/cloudflare-
6868

6969
## 4. Test the WARP Connector
7070

71-
You can now test if traffic from your subnet routes through Cloudflare.
71+
You can now test if traffic from your subnet routes through Cloudflare. For example,
7272

7373
1. On the `10.0.0.2` device, run `curl --ipv4 www.google.com`.
7474
2. Check your [Gateway DNS logs](/cloudflare-one/insights/logs/gateway-logs/) for queries from `warp_connector@<your-team-name>.cloudflareaccess.com`. Logs may take a few minutes to populate.
@@ -77,10 +77,10 @@ You can now test if traffic from your subnet routes through Cloudflare.
7777
flowchart LR
7878
subgraph subnet1[Subnet 10.0.0.0/24]
7979
device1["Device
80-
10.0.0.2"]-->router1["WARP Connector
80+
10.0.0.2"]--Request-->router1["WARP Connector
8181
10.0.0.1"]
8282
end
8383
router1-->C((Cloudflare))-->I{Internet}
8484
```
8585

86-
[^1]: Check the [system requirements](/cloudflare-one/connections/connect-devices/warp/download-warp/#linux). Package dependencies are the following: `curl`, `gpg`, `iptables`, `iptables-persistent`, `lsb-core`, and `sudo`.
86+
[^1]: <Render file="tunnel/warp-connector-linux-packages" />

src/content/docs/cloudflare-one/connections/connect-networks/private-net/warp-connector/site-to-site.mdx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,9 @@ Depending on where you installed the WARP Connector, you may need to configure o
9393

9494
#### Route from subnet to subnet
9595

96-
For example, for laptop `10.0.0.2` to reach applications behind subnet `192.168.1.0/24`, add a rule on the router that routes `192.168.1.0/24` to the WARP Connector host machine (`10.0.0.100`). When a device sends a request to `192.168.1.0/24`, the router will first redirect the traffic to the WARP Connector host. WARP Connector encrypts the traffic, changes its destination IP to the [WARP ingress IP](/cloudflare-one/connections/connect-devices/warp/deployment/firewall/#warp-ingress-ip), and sends it back to the router. The router will now forward this encrypted traffic to Cloudflare.
96+
For example, for devices on subnet `10.0.0.0/24` to reach applications behind subnet `192.168.1.0/24`, add a rule on the router that routes `192.168.1.0/24` to the WARP Connector host machine (`10.0.0.100`).
9797

98-
:::note
99-
100-
Ensure that your routing rules do not forward the [WARP ingress IP](/cloudflare-one/connections/connect-devices/warp/deployment/firewall/#warp-ingress-ip) back to the WARP Connector.
101-
:::
98+
<Render file="tunnel/warp-connector-alternate-gateway-flow" />
10299

103100
### Option 3: Intermediate gateway
104101

@@ -181,4 +178,4 @@ You can now test the connection between the two subnets. For example, on the `10
181178
If you are testing with curl using private hostnames, add the `--ipv4` flag to your curl commands.
182179
:::
183180

184-
[^1]: Check the [system requirements](/cloudflare-one/connections/connect-devices/warp/download-warp/#linux). Package dependencies are the following: `curl`, `gpg`, `iptables`, `iptables-persistent`, `lsb-core`, and `sudo`.
181+
[^1]: <Render file="tunnel/warp-connector-linux-packages" />
Lines changed: 97 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,116 @@
11
---
22
pcx_content_type: how-to
3-
title: Connect WARP clients to private network
3+
title: Connect private network to WARP clients
44
sidebar:
55
label: User-to-site
66
order: 3
77
---
88

99
import { Render, Details, GlossaryTooltip, TabItem, Tabs } from "~/components";
1010

11+
This guide covers how to connect WARP client user devices to a private network behind WARP Connector. In this example, we will create a WARP Connector for subnet `10.0.0.0/24` and install it on `10.0.0.1`.
12+
1113
```mermaid
1214
flowchart LR
1315
subgraph subnet1[Subnet 10.0.0.0/24]
1416
router1["WARP Connector
1517
10.0.0.1"]
1618
end
17-
router1<-->C((Cloudflare))<-->W[WARP client]
19+
W[WARP clients]-->C((Cloudflare))-->router1
1820
```
1921

22+
:::note
23+
To connect a private network using `cloudflared`, refer to [Connect private networks](/cloudflare-one/connections/connect-networks/private-net/cloudflared/).
24+
:::
25+
26+
## Prerequisites
27+
28+
- A Linux host [^1] on the subnet
29+
- Verify that your firewall allows inbound/outbound traffic over the [WARP IP addresses, ports, and domains](/cloudflare-one/connections/connect-devices/warp/deployment/firewall/).
30+
31+
## 1. Install a WARP Connector
32+
33+
<Render file="tunnel/warp-connector-install" />
34+
35+
## 2. (Recommended) Create a device profile
36+
37+
<Render file="tunnel/warp-connector-device-profile" />
38+
39+
## 3. Route CGNAT IPs through Cloudflare
40+
41+
WARP clients and WARP Connectors are accessed using their <GlossaryTooltip term="CGNAT IP">CGNAT IP</GlossaryTooltip>. Therefore, CGNAT IP traffic must route through Cloudflare on both the WARP Connector host and WARP client devices.
42+
43+
1. In your WARP Connector device profile, delete `100.96.0.0/12` from the [Split Tunnel Exclude list](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/split-tunnels/) (or add it to the Split Tunnel Include list).
44+
2. Repeat the previous step for all WARP client device profiles.
45+
46+
## 4. Route traffic from subnet to WARP Connector
47+
48+
Depending on where you installed the WARP Connector, you may need to configure other devices on the subnet to route requests through WARP Connector.
49+
50+
### Option 1: Default gateway
51+
52+
<Render file="tunnel/warp-connector-default-gateway" />
53+
54+
### Option 2: Alternate gateway
55+
56+
<Render file="tunnel/warp-connector-alternate-gateway" />
57+
2058
#### Route from subnet to WARP clients
2159

22-
`100.96.0.0/12` is the default CIDR for all user devices running the [WARP client](/cloudflare-one/connections/connect-devices/warp/). To connect from the subnet to user devices:
23-
- On your router, add a rule that routes the destination IP `100.96.0.0/12` to the WARP Connector host machine (`10.0.0.100` in the diagram above).
24-
- Ensure that CGNAT IP traffic routes through WARP on both the WARP Connector host and WARP client devices. In other words, delete `100.96.0.0/12` from the [Split Tunnel Exclude list](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/split-tunnels/) in both device profiles.
60+
`100.96.0.0/12` is the default CIDR for all user devices running the [WARP client](/cloudflare-one/connections/connect-devices/warp/). On your router, add a rule that routes the destination IP `100.96.0.0/12` to the WARP Connector host machine (`10.0.0.100`).
61+
62+
<Render file="tunnel/warp-connector-alternate-gateway-flow" />
63+
64+
### Option 3: Intermediate gateway
65+
66+
<Render file="tunnel/warp-connector-intermediate-gateway" />
67+
68+
#### Route CGNAT IPs
69+
70+
To route all <GlossaryTooltip term="CGNAT IP">CGNAT IP</GlossaryTooltip> traffic through WARP Connector:
71+
72+
<Tabs> <TabItem label="Linux">
73+
74+
```sh
75+
sudo ip route add 100.96.0.0/12 via <WARP-CONNECTOR-IP> dev eth0
76+
```
77+
78+
</TabItem> <TabItem label="macOS">
79+
80+
```sh
81+
sudo route -n add -net 100.96.0.0/12 <WARP-CONNECTOR-IP>
82+
```
83+
84+
</TabItem>
85+
86+
<TabItem label="Windows">
87+
88+
```bash
89+
route /p add 100.96.0.0/12 mask 255.255.255.255 <WARP-CONNECTOR-IP>
90+
```
91+
92+
</TabItem> </Tabs>
93+
94+
#### Verify routes
95+
96+
<Render file="tunnel/warp-connector-verify-routes" />
97+
98+
## 4. Test the WARP Connector
99+
100+
You can now send a request from a device behind WARP Connector to a WARP client user device.
101+
102+
1. From **My Team** > **Devices**, determine the **Virtual IPv4** address of the WARP client device.
103+
2. From a device on the private network, run `ping <WARP-VIRTUAL-IPV4>`.
104+
105+
```mermaid
106+
flowchart LR
107+
subgraph subnet1[Subnet 10.0.0.0/24]
108+
device1["Device
109+
10.0.0.2"]--ping 100.96.0.21-->router1["WARP Connector
110+
10.0.0.1"]
111+
end
112+
router1-->C((Cloudflare))-->W["WARP client
113+
100.96.0.21"]
114+
```
115+
116+
[^1]: <Render file="tunnel/warp-connector-linux-packages" />
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
{}
3+
---
4+
5+
When a device on the subnet sends a request, the router will first redirect the traffic to the WARP Connector host. WARP Connector encrypts the traffic, changes its destination IP to the [WARP ingress IP](/cloudflare-one/connections/connect-devices/warp/deployment/firewall/#warp-ingress-ip), and sends it back to the router. The router will now forward this encrypted traffic to Cloudflare.
6+
7+
:::note
8+
9+
Ensure that your routing rules do not forward the [WARP ingress IP](/cloudflare-one/connections/connect-devices/warp/deployment/firewall/#warp-ingress-ip) back to the WARP Connector.
10+
:::
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
{}
3+
---
4+
5+
Check the [system requirements](/cloudflare-one/connections/connect-devices/warp/download-warp/#linux). Package dependencies are the following: `curl`, `gpg`, `iptables`, `iptables-persistent`, `lsb-core`, and `sudo`.

src/content/partials/cloudflare-one/tunnel/warp-connector-route-all-traffic.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can configure all traffic on a device to egress through WARP Connector with
1212
sudo ip route add default via <WARP-CONNECTOR-IP> dev eth0 metric 101
1313
```
1414

15-
Ensure that the `metric` value is lower than other default gateways. To verify that WARP Connector is now the preferred default gateway, run `ip route get <DESTINATION-IP>`.
15+
Ensure that the `metric` value is lower than other default gateways.
1616

1717
</TabItem> <TabItem label="macOS">
1818

@@ -28,4 +28,6 @@ sudo route -n change default <WARP-CONNECTOR-IP> -interface en0
2828
route /p add 0.0.0.0 mask 0.0.0.0 <WARP-CONNECTOR-IP> metric 101
2929
```
3030

31+
Ensure that the `metric` value is lower than other default gateways.
32+
3133
</TabItem> </Tabs>

0 commit comments

Comments
 (0)