Routes·续
Cloudflare will now proxy traffic from enrolled devices, except for the traffic excluded in your split tunnel settings. For more information on how Gateway forwards traffic, refer to Gateway proxy. - Route the following IPv4 ranges through Cloudflare in the Split Tunnel configuration of both the Mesh node's device profile and your client device profiles. In Include mode, add each range. In Exclude mode, ensure none of them (or their parent ranges) are excluded.
| Purpose | IPv4 |
|---|---|
| Mesh device IP range | 100.96.0.0/12 |
| Cloudflare source IP range | 100.64.0.0/12 |
The hostname routing (token IP) range ( 172.64.128.0/20) and all Cloudflare One IPv6 ranges are automatically routed through Cloudflare and do not need to be added manually.
- Remove the hostname's top-level domain from Local Domain Fallback on client devices, so the DNS query is sent to Cloudflare Gateway for resolution.
Add a hostname route
- In the Cloudflare dashboard, go to Networking > Mesh. Go to Mesh ↗
- Select your Mesh node.
- Go to the Routes tab.
- Select Add route, then select Private hostname.
- Enter the fully qualified domain name (FQDN) you want to route through this node (for example,
wiki.internal.local).<details><summary>
Hostname format restrictions</summary>
- Character limit: Must be less than 255 characters.
- Supported wildcards: A single wildcard (<code></code>) is allowed, and it must represent a full DNS label. Example: <code>.internal.local</code>
- Unsupported wildcards: The following wildcard formats are not supported:
- Partial wildcards such as <code>-dev.internal.local</code> or <code>dev-.internal.local</code>.
- Wildcards in the middle, such as <code>foobar.internal.local</code> or <code>foo..internal.local</code>.
- Multiple wildcards in the hostname, such as <code>..internal.local</code>.
- Wildcard trimming: Leading wildcards (<code></code>) are trimmed off and an implicit dot (<code>.</code>) is assumed. For example, <code>.internal.local</code> is saved as <code>internal.local</code> but will match all subdomains at the wildcard level (covers <code>foo.internal.local</code> but not <code>foo.bar.internal.local</code>).
-
Dot trimming: Leading and ending dots (<code>.</code>) are allowed but trimmed off.</details>
-
(Optionally) add a description for the route.
- Select Add hostname.
<details>
<summary>
Required API token permissions
</summary>
At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:
- <code>Cloudflare One Networks Write</code>
- <code>Cloudflare Tunnel Write</code>
</details>
Create hostname routebash
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/zerotrust/routes/hostname" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"hostname": "wiki.internal.local",
"tunnel_id": "{mesh_node_id}",
"comment": "Internal wiki"
}'
Configure DNS resolution
For a private hostname, Gateway must be able to resolve the hostname to its private IP. How you configure this depends on whether DNS resolution and application traffic use the same connector or different connectors.
The node resolves the hostname (default)
By default, the Mesh node resolves the hostname using the DNS resolver configured on its host machine (for example, in /etc/resolv.conf on Linux) — the same way cloudflared does. If the node can already resolve the hostname to its private IP through that resolver, no further configuration is required.
If the node cannot resolve the hostname on its own, the simplest option is to add an entry to the node's hosts file (for example, /etc/hosts on Linux) mapping the hostname to its private IP. Unlike a Cloudflare Tunnel, a Mesh node does not require you to run a dedicated DNS server:
/etc/hoststxt
10.0.0.50 wiki.internal.local
Split DNS: DNS and application traffic use different connectors
You only need a Gateway resolver policy when the DNS query must be sent to a different connector than the application traffic — for example, the internal DNS server sits behind one Mesh node or Cloudflare Tunnel, while the application is reached through another. In that case:
- Add a CIDR route for the DNS server's IP so Gateway can reach it through the connector where the DNS server lives (a Mesh node or a Cloudflare Tunnel).
- Create a resolver policy that sends DNS queries for the hostname (or its domain) to that internal DNS server.
Where to run the DNS server
If the DNS server is reached through a Mesh node, you cannot run it on the same machine as that node — the node's DNS interface binds port 53. Host the DNS server on a separate machine in the same private network. In that case, configure return routes on the subnet so the DNS server's responses can reach the client:
- Mesh device IP range:
100.96.0.0/12→ next hop is the Mesh node's local IP - Initial resolved IP range:
172.64.128.0/20→ next hop is the Mesh node's local IP
For a public hostname, the Mesh node handles resolution: Gateway sends the DNS query to the node, the node resolves it through its upstream DNS provider, and then routes the packet to the destination and egresses using its own public IP. No internal DNS server or resolver policy is required.
Secure hostname traffic
After adding a hostname route, secure it with either an Access self-hosted application or Gateway network policies. For details and examples, refer to Connect a private hostname.
Limitations
Starting with Chrome 142 ↗︎, Local Network Access (LNA) restricts requests from websites to local IP addresses. LNA is implemented at the Chromium engine level, so this affects all Chromium-based browsers (for example, Microsoft Edge, Brave, and Opera), not only Google Chrome. This can affect accounts whose Gateway initial resolved IP range is still drawn from Carrier-Grade NAT (CGNAT) address space (100.64.0.0/10) — for example, the legacy default range 100.80.0.0/16, or a custom range configured within CGNAT space. These browsers categorize such addresses as belonging to a local network. When a website loaded from a public IP makes subrequests to a domain resolved through an initial resolved IP in this space, the browser treats this as a public-to-local network request and displays a prompt asking the user to allow access to devices on the local network. The browser blocks requests to these domains until the user accepts this prompt.
This commonly occurs when an Egress policy matches broadly used domains (such as cloudfront.net or github.com), causing subrequests from public pages to resolve into CGNAT space.
Accounts using the current default initial resolved IP range (172.64.128.0/20) are not affected, because this range is public Cloudflare address space rather than CGNAT. If your account was created before this default changed, or if you configured a custom CGNAT-space range, refer to Configure initial resolved IPs to move to a non-CGNAT range instead of relying on the following browser workarounds.
The workarounds below use Google Chrome Enterprise policies. If your organization manages a different Chromium-based browser, consult that browser's enterprise policy documentation for an equivalent control.
Iframes
If the affected request originates from within an iframe (for example, an application embedded in a third-party portal), the iframe must declare the local-network-access permission for the browser prompt to appear in the parent frame:
- Chrome 142-144: Use the
allow="local-network-access"attribute on the iframe element. - Chrome 145+: The permission was split into
allow="local-network"andallow="loopback-network".
If iframes are nested, every iframe in the chain must include the appropriate attribute. Since third-party applications control their own iframe attributes, this may not be configurable by the end user.
Workarounds
To avoid this issue, choose one of the following options:
- Override IP address space classification (Chrome 146+): Use the
LocalNetworkAccessIpAddressSpaceOverrides↗︎ Chrome Enterprise policy to reclassify your CGNAT-space initial resolved IP range (for example,100.80.0.0/16) as public. This is the most targeted fix because it only changes the classification for the initial resolved IP range rather than disabling security checks entirely. - Allow specific URLs (Chrome 140+): Use the
LocalNetworkAccessAllowedForUrls↗︎ Chrome Enterprise policy to exempt specific websites from Local Network Access checks. Note thathttps://*is a valid entry to disable checks for all URLs. - Allow specific URLs (Chrome 146+): Use the
LocalNetworkAllowedForUrls↗︎ Chrome Enterprise policy, which replacesLocalNetworkAccessAllowedForUrlsstarting in Chrome 146. - Opt out of Local Network Access restrictions (Chrome 142-152): Use the
LocalNetworkAccessRestrictionsTemporaryOptOut↗︎ Chrome Enterprise policy to completely opt out of Local Network Access restrictions. This is a temporary policy and will be removed after Chrome 152. - Disable the Chrome feature flag: Go to
chrome://flagsand set the Local Network Access Checks flag to Disabled. This approach is suitable for individual users but not for enterprise-wide deployment.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/mesh/features/routes/#page","headline":"Routes","description":"Configure CIDR and hostname routes to send private network traffic through Cloudflare Mesh nodes.","url":"https://developers.cloudflare.com/mesh/features/routes/","inLanguage":"en","image":"https://developers.cloudflare.com/mesh/features/routes/og.png?v=df9ded2b2922b1cc","dateModified":"2026-09-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["Private networks"]}
description: Connect devices and deploy Cloudflare Mesh nodes on Linux hosts and in container environments. title: Guides image: https://developers.cloudflare.com/mesh/guides/og.png?v=f47253a4437bcc4a
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/mesh/llms.txt
Use this file to discover all available pages before exploring further.
Docs