Skip to content

Commit 4239707

Browse files
deadlypants1973pedrosousa
authored andcommitted
[CF1] docker + WARP DNS (#22214)
* [CF1] docker + WARP DNS * Update src/content/docs/cloudflare-one/connections/connect-devices/warp/troubleshooting/known-limitations.mdx Co-authored-by: Pedro Sousa <[email protected]> --------- Co-authored-by: Pedro Sousa <[email protected]>
1 parent 1dbc243 commit 4239707

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

src/content/docs/cloudflare-one/connections/connect-devices/warp/troubleshooting/known-limitations.mdx

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,58 @@ or create a Docker network with a working MTU value:
100100
docker network create -o "com.docker.network.driver.mtu=1420" my-docker-network
101101
```
102102

103-
The MTU value should be set to the MTU of your host's default interface minus 80 bytes for the WARP protocol overhead. Most MTUs are 1500, so 1420 should work for most users.
103+
The MTU value should be set to the MTU of your host's default interface minus 80 bytes for the WARP protocol overhead. Most MTUs are 1500, so 1420 should work for most users.
104+
105+
## Access WARP DNS from Docker
106+
107+
WARP runs a local DNS proxy on `127.0.2.2` and `127.0.2.3`. You may need access to these addresses from within Docker containers to resolve internal-only or fallback domains. The default Docker [bridge network](https://docs.docker.com/engine/network/drivers/bridge/) copies the DNS settings from the host, but filters out loopback DNS addresses like `127.0.2.2` and `127.0.2.3`, so containers cannot use them.
108+
109+
To enable WARP DNS resolution with containers:
110+
111+
- Use a [custom Docker network](https://docs.docker.com/engine/network/#user-defined-networks) (recommended): Allows the Docker container to still use the bridge network driver that maintains network isolation from the host. If you are creating your own bridge network, you should also [adjust the MTU accordingly](/cloudflare-one/connections/connect-devices/warp/troubleshooting/known-limitations/#docker-on-linux-with-bridged-networking).
112+
- Use [host networking](https://docs.docker.com/engine/network/drivers/host/) (not recommended): Removes the security benefits of network isolation and may lead to port conflicts.
113+
114+
The following example uses a special host (`connectivity-check.warp-svc`) that is only resolvable by the local DNS proxy to show the supported Docker networking modes.
115+
116+
```
117+
# This host is not resolvable by default
118+
❯ docker run --rm alpine nslookup connectivity-check.warp-svc.
119+
Server: 8.8.8.8
120+
Address: 8.8.8.8:53
121+
122+
** server can't find connectivity-check.warp-svc.: NXDOMAIN
123+
** server can't find connectivity-check.warp-svc.: NXDOMAIN
124+
125+
# Create a bridge network called demo
126+
❯ docker network create demo
127+
e1e1943a6995a7e8c115a1c60357fe64f87a3ae90074ce6e4c3f0d2bba3fa892
128+
129+
# The host is resolvable by running a container under this custom network
130+
❯ docker run --rm --net demo alpine nslookup connectivity-check.warp-svc.
131+
Server: 127.0.0.11
132+
Address: 127.0.0.11:53Non-authoritative answer:
133+
Name: connectivity-check.warp-svc
134+
Address: ::ffff:127.0.2.2
135+
Name: connectivity-check.warp-svc
136+
Address: ::ffff:127.0.2.3Non-authoritative answer:
137+
Name: connectivity-check.warp-svc
138+
Address: 127.0.2.2
139+
Name: connectivity-check.warp-svc
140+
Address: 127.0.2.3
141+
142+
# The host is also resolvable by running a container using a host network
143+
❯ docker run --rm --net host alpine nslookup connectivity-check.warp-svc.
144+
Server: 127.0.0.11
145+
Address: 127.0.0.11:53Non-authoritative answer:
146+
Name: connectivity-check.warp-svc
147+
Address: ::ffff:127.0.2.2
148+
Name: connectivity-check.warp-svc
149+
Address: ::ffff:127.0.2.3Non-authoritative answer:
150+
Name: connectivity-check.warp-svc
151+
Address: 127.0.2.2
152+
Name: connectivity-check.warp-svc
153+
Address: 127.0.2.3
154+
```
104155

105156
## Windows 10 in Microsoft 365 Cloud PC is not supported
106157

0 commit comments

Comments
 (0)