Skip to content

Commit 8c3e2cf

Browse files
committed
diagrams and concepts
1 parent 64d7cef commit 8c3e2cf

File tree

8 files changed

+83
-12
lines changed

8 files changed

+83
-12
lines changed
41.5 KB
Loading
35.1 KB
Loading

src/content/docs/cloudflare-one/connections/connect-networks/private-net/cloudflared/connect-cidr.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import { Render } from "~/components";
99

10-
This guide covers how to enable secure remote access to private IP addresses using `cloudflared`. You can connect an entire private network, a subnet, or an application defined by a static IP.
10+
This guide covers how to enable secure remote access to private IP addresses using `cloudflared` and WARP. You can connect an entire private network, a subnet, or an application defined by a static IP.
1111

1212
## 1. Connect the server to Cloudflare
1313

src/content/docs/cloudflare-one/connections/connect-networks/private-net/cloudflared/connect-hostname.mdx

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
pcx_content_type: how-to
3+
title: Connect a private hostname
4+
sidebar:
5+
order: 2
6+
---
7+
8+
import { Render } from "~/components";
9+
10+
`cloudflared` can route to non-HTTP applications on your private network using their private hostname (for example, `wiki.internal.local`). Private hostname routes are especially useful when the application has an unknown or ephemeral IP, which often occurs when infrastructure is provisioned by a third-party cloud provider.
11+
12+
:::note[Availability]
13+
Hostname routes currently require Gateway resolver policies, an Enterprise-only feature. If you are on a Free or Pay-as-you-go plan, you will need to connect the application using its [IP address](/cloudflare-one/connections/connect-networks/private-net/cloudflared/connect-cidr) and [configure Local Domain Fallback](/cloudflare-one/connections/connect-networks/private-net/cloudflared/private-dns/) to resolve its private hostname.
14+
:::
15+
16+
## Limitations
17+
18+
### Supported user traffic
19+
20+
### Supported network on-ramps
21+
22+
## How private hostname routing works
23+
24+
Private hostname routing with Cloudflare Tunnel consists of three main components:
25+
26+
- The WARP client installs on the user device and forwards network and DNS traffic from the device to Cloudflare Gateway.
27+
- Gateway resolver policies instruct Gateway to resolve the private hostname using your internal DNS resolver instead of the default public resolver.
28+
- `cloudflared` installs on a host machine in your private network and proxies traffic from Cloudflare to your internal DNS resolver and internal applications.
29+
30+
Figures 1 and 2 illustrate what happens when a user connects to a private hostname (`wiki.internal.local`) from a WARP device.
31+
32+
![Figure 1: DNS resolution for a private hostname](~/assets/images/cloudflare-one/connections/private-hostname-route-1.png "Figure 1: DNS resolution for private hostname")
33+
34+
1. The WARP client sends the DNS query to the Gateway resolver for resolution.
35+
2. Based on the configured resolver policies, Gateway determines that `wiki.internal.local` should be resolved by a custom DNS resolver. Therefore, Gateway sends the DNS request down Cloudflare Tunnel to the private network where the custom DNS resolver is located.
36+
3. `cloudflared` does a DNS lookup to figure out what the origin IP is for `wiki.internal.local`.
37+
4. The Gateway resolver now knows that the origin IP is `10.0.0.5`.
38+
5. Rather than responding to the DNS query with the actual origin IP, Gateway responds with a random IP address from the CGNAT range `100.80.0.0/16` (for example, `100.80.0.1`). This CGNAT IP is called the initial resolved IP.
39+
6. Gateway stores the mapping between the private hostname, CGNAT initial resolved IP, and the actual IP.
40+
7. The WARP client receives the initial resolved IP (`100.80.0.1`) in the DNS response for `wiki.internal.local`.
41+
42+
As shown in Figure 2 below, the WARP client will now send `wiki.internal.local` traffic to the initial resolved IP through Gateway. Because the destination IP falls within the designated CGNAT range, Gateway knows how it maps to the actual origin IP. Traffic that passes your network policies will now route through Cloudflare Tunnel to the private application.
43+
44+
![Figure 2: Network traffic flow for a private hostname route](~/assets/images/cloudflare-one/connections/private-hostname-route-2.png "Figure 1: Network traffic flow for a private hostname route")
45+
46+
To learn more about the initial resolved IP mechanism, refer to the [Cloudflare blog]().
47+
48+
## Configure a private hostname route
49+

src/content/docs/cloudflare-one/connections/connect-networks/private-net/cloudflared/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ On the client side, end users connect to Cloudflare's global network using the C
1313
![Diagram displaying connections between a device, Cloudflare, and a private network.](~/assets/images/cloudflare-one/connections/private-ips-diagram.png)
1414

1515
To enable remote access to your private network, refer to the following guides:
16-
- [**Connect a hostname**](/cloudflare-one/connections/connect-networks/private-net/cloudflared/connect-hostname/): Route network traffic to an internal application using its private or public hostname.
16+
- [**Connect a private hostname**](/cloudflare-one/connections/connect-networks/private-net/cloudflared/connect-hostname/): Route network traffic to an internal application using its hostname.
1717
- [**Connect an IP/CIDR**](/cloudflare-one/connections/connect-networks/private-net/cloudflared/connect-cidr/): Route traffic to an internal IP address or CIDR range.

src/content/docs/cloudflare-one/connections/connect-networks/private-net/cloudflared/private-dns.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
pcx_content_type: how-to
3-
title: Resolve private DNS
3+
title: Private DNS
44
sidebar:
55
order: 4
66
---
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
pcx_content_type: how-to
3+
title: Egress through Cloudflare Tunnel
4+
sidebar:
5+
order: 2
6+
---
7+
8+
import { Details } from "~/components";
9+
10+
Cloudflare Tunnel can be used for source IP anchoring when you want to use existing egress IPs instead of purchasing [Cloudflare dedicated egress IPs](/cloudflare-one/policies/gateway/egress-policies/dedicated-egress-ips/). Some third-party websites may have an Access Control List (ACL) that only allow connections from certain source IPs. If you already a non-Cloudflare IP on their allowlist (such an egress IP provided by an ISP or a cloud provider like AWS), you can configure `cloudflared` to anchor user traffic to the same IPs that you use today.
11+
12+
For example, assume that your organization's banking service, `app.bank.com`, expects user traffic to come from an AWS IP. You can install `cloudflared` in your AWS envirionment and add a public hostname route pointing to `app.bank.com`. When users connect to `app.bank.com` using the WARP client, Gateway will route their traffic down the corresponding Cloudflare Tunnel to AWS. The traffic can then egress to the public Internet using your AWS egress IP.
13+
14+
```mermaid
15+
flowchart LR
16+
subgraph aws["AWS VPC"]
17+
cloudflared["cloudflared"]--> rules["Egress rules"]
18+
end
19+
subgraph cloudflare[Cloudflare]
20+
resolver["Gateway
21+
resolver"]
22+
end
23+
warp["WARP
24+
clients"]--"app.bank.com"-->resolver
25+
resolver-->cloudflared
26+
rules--AWS egress IP -->I{Internet}
27+
```
28+
29+
## Prerequisites
30+
31+
## Configure a public hostname route

0 commit comments

Comments
 (0)