Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,88 +7,9 @@ description: Learn how to connect to Cloudflare's 1.1.1.1 using DNS over HTTPS (

Several DoH clients are available for connecting to 1.1.1.1.

## cloudflared
## Cloudflare WARP client

1. [Download and install the `cloudflared` daemon](/cloudflare-one/connections/connect-networks/downloads/).

2. Verify that the `cloudflared` daemon is installed by entering the following command:

```sh
cloudflared --version
```

```sh output
cloudflared version 2020.11.11 (built 2020-11-25-1643 UTC)
```

3. Start the DNS proxy on an address and port in your network. If you do not specify an address and port, it will start listening on `localhost:53`. DNS (53) is a privileged port, so for the initial demo we will use a different port:

```sh
cloudflared proxy-dns --port 5553
```

```sh output
INFO[2020-12-04T19:58:57Z] Adding DNS upstream - url: https://1.1.1.1/dns-query
INFO[2020-12-04T19:58:57Z] Adding DNS upstream - url: https://1.0.0.1/dns-query
INFO[2020-12-04T19:58:57Z] Starting metrics server on 127.0.0.1:44841/metrics
INFO[2020-12-04T19:58:57Z] Starting DNS over HTTPS proxy server on: dns://localhost:5553
```

4. You can verify that `cloudflared` is running using a `dig`, `kdig`, `host`, or any other DNS client.

```sh
dig +short @127.0.0.1 -p5553 cloudflare.com AAAA
```

```sh output
2606:4700::6810:85e5
2606:4700::6810:84e5
```

5. Run `cloudflared` as a service so it starts on user login. On many Linux distributions, this can be done with:

```sh
sudo tee /etc/systemd/system/cloudflared-proxy-dns.service >/dev/null <<EOF
```

```sh output
[Unit]
Description=DNS over HTTPS (DoH) proxy client
Wants=network-online.target nss-lookup.target
Before=nss-lookup.target

[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
DynamicUser=yes
ExecStart=/usr/local/bin/cloudflared proxy-dns

[Install]
WantedBy=multi-user.target
EOF
```

```sh
sudo systemctl enable --now cloudflared-proxy-dns
```

6. Change your system DNS servers to use `127.0.0.1`. On Linux, you can modify `/etc/resolv.conf`:

```sh
sudo rm -f /etc/resolv.conf
echo nameserver 127.0.0.1 | sudo tee /etc/resolv.conf >/dev/null
```

7. Finally, verify it locally with:

```sh
dig +short @127.0.0.1 cloudflare.com AAAA
```

```sh output
2606:4700::6810:85e5
2606:4700::6810:84e5
```
Refer to [WARP client](/warp-client/) for guidance on WARP modes and get-started information for different [operating systems](/warp-client/get-started/).

## DNSCrypt-Proxy

Expand Down