Skip to content

Commit 9b09b2d

Browse files
authored
[Gateway] Generic DoT/DoH endpoints (#20570)
* Add new DoT instructions * Remove limitation section * Add generic DoT procedure * Refine values * Add DoH procedure * Add generic DoH endpoint * More specific wording
1 parent f7ec648 commit 9b09b2d

File tree

3 files changed

+33
-26
lines changed

3 files changed

+33
-26
lines changed
Binary file not shown.

src/content/docs/cloudflare-one/connections/connect-devices/agentless/dns/dns-over-https.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Location-based policies require that you send DNS requests to a [location-specif
1313

1414
## Filter DoH requests by location
1515

16-
Location-based policies require that you send DNS requests to a unique <GlossaryTooltip term="DoH subdomain">DoH endpoint</GlossaryTooltip> assigned to the location:
16+
Location-based policies require that you send DNS queries to a unique <GlossaryTooltip term="DoH subdomain">DoH endpoint</GlossaryTooltip> assigned to the location:
1717

1818
```txt
1919
https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query
@@ -105,6 +105,17 @@ For more information, refer to [Microsoft's DoH guide](https://learn.microsoft.c
105105

106106
</Details>
107107

108+
### Use generic DoH endpoint
109+
110+
You can send DoH requests to the generic Cloudflare DoH endpoint, `dns.cloudflare-gateway.com`. To specify a location in your request, include a header named `cf-dns-location` with a value of your location's DoH subdomain. For example:
111+
112+
```http
113+
GET /dns-query?name=example.com&type=A HTTP/2
114+
Host: dns.cloudflare-gateway.com
115+
cf-dns-location: 9y65g5srsm
116+
Accept: application/dns-message
117+
```
118+
108119
## Filter DoH requests by user
109120

110121
In order to filter DoH queries based on user identity, each query must include a user-specific authentication token. If you have several devices per user and want to apply device-specific policies, you will need to map each device to a different email.

src/content/docs/cloudflare-one/connections/connect-devices/agentless/dns/dns-over-tls.mdx

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,40 @@ sidebar:
77

88
By default, DNS is sent over a plaintext connection. DNS over TLS (DoT) is a standard for encrypting DNS queries to keep them secure and private. DoT uses the same security protocol, TLS, that HTTPS websites use to encrypt and authenticate communications.
99

10-
Cloudflare supports DoT on standard port `853` and is compliant with [RFC7858](https://tools.ietf.org/html/rfc7858).
10+
Cloudflare supports DoT on standard port `853` over TLS 1.2 and TLS 1.3 in compliance with [RFC7858](https://tools.ietf.org/html/rfc7858).
1111

12-
## 1. Obtain your DoT hostname
12+
## Configure DoT queries
13+
14+
### 1. Obtain your DoT hostname
1315

1416
Each Gateway DNS location has a unique DoT hostname. DNS locations and corresponding DoT hostnames have policies associated with them.
1517

1618
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Gateway** > **DNS locations**.
17-
2. If you have more than one location set up, you will see a list of all your locations.
18-
3. Expand the location card for the location whose DoT hostname you'd like to retrieve.
19-
4. Get the **DoT hostname** for the location.
20-
21-
In the example below, the DoT hostname is: `9y65g5srsm.cloudflare-gateway.com`.
19+
2. [Add a new location](/cloudflare-one/connections/connect-devices/agentless/dns/locations/) or select an existing location from the list.
20+
3. Under **DoT endpoint**, copy the value in **DoT addresses**.
2221

23-
![Getting the DoT hostname for a DNS location from the dashboard](~/assets/images/cloudflare-one/connections/get-unique-subdomain.png)
22+
The DoT hostname contains your unique location name. For example, if the DoT hostname is `9y65g5srsm.cloudflare-gateway.com`, the location name is `9y65g5srsm`.
2423

25-
Next, configure your DoT client with the DoT hostname.
24+
### 2. Configure your DoT client
2625

27-
## 2. Configure your DoT client
26+
To configure a DoT client such as `dig`, specify the IP address and the DoT hostname for your location in your query. For example:
2827

29-
Depending on your operating system, you can choose from a variety of standalone DoT clients.
28+
```txt
29+
Hostname: 9y65g5srsm.cloudflare-gateway.com
30+
IP address: 162.159.36.5
31+
```
3032

31-
To configure your DoT client, enter the following IP address and the DoT hostname for your location (for example, `9y65g5srsm.cloudflare-gateway.com`):
33+
Alternatively, you can use the generic DoT endpoint (`dns.cloudflare-gateway.com`) and include an `OPT` record with code `65011`. You can select a specific location for the value of the `OPT` record. For example:
3234

3335
```txt
34-
Hostname: <DoT hostname>
36+
Hostname: dns.cloudflare-gateway.com
3537
IP address: 162.159.36.5
38+
OPT Record:
39+
- Code: 65011
40+
- Value: 9y65g5srsm
3641
```
3742

38-
Alternatively, stub resolvers (e.g., Unbound) support DoT natively. An example configuration is shown below.
43+
Some stub resolvers support DoT natively. For example, you can configure Unbound to send a DoT query:
3944

4045
```txt
4146
# Unbound TLS Config
@@ -44,15 +49,6 @@ tls-cert-bundle: "/etc/ssl/cert.pem"
4449
forward-zone:
4550
name: "."
4651
forward-tls-upstream: yes
47-
forward-addr: 172.64.36.1@853#9y65g5srsm.cloudflare-gateway.com
48-
forward-addr: <IPv6 address>#<DoT hostname>
52+
forward-addr: 162.159.36.5@853#9y65g5srsm.cloudflare-gateway.com
53+
forward-addr: 2001:db8:abcd::1234#9y65g5srsm.cloudflare-gateway.com
4954
```
50-
51-
:::note
52-
53-
Each DNS location has a unique DoT hostname and IPv6 address. Remember to substitute your location's values into the `<IPv6 address>` and `<DoT hostname>` fields.
54-
:::
55-
56-
## Supported TLS versions
57-
58-
Cloudflare's DNS over TLS supports TLS 1.3 and TLS 1.2.

0 commit comments

Comments
 (0)