Skip to content

Commit 142fd3a

Browse files
[Magic] Tunnel endpoints partials (#21092)
* added vars * removed markdown * added gre ipsec tunnels subtitle * removed note title * renamed vars * added anti replay * add tunnels * renamed vard * optional mt egress * legacy hcs * refined render with extra info * updated var * reorg vars * added render vars * corrected var * deleted content not needed * removed extra line * added link * deleted partials not needed * moved partial * corrected path * Apply suggestions from code review Co-authored-by: Jun Lee <[email protected]> * re added icmp partial --------- Co-authored-by: Jun Lee <[email protected]>
1 parent 8f0e1a1 commit 142fd3a

File tree

10 files changed

+95
-218
lines changed

10 files changed

+95
-218
lines changed

src/content/docs/magic-transit/how-to/configure-tunnels.mdx

Lines changed: 8 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -11,73 +11,22 @@ description: Cloudflare recommends two tunnels for each ISP and network location
1111

1212
import { GlossaryTooltip, Render } from "~/components";
1313

14-
<Render file="tunnel-endpoints/tunnel-endpoints" params={{ ipRange: " " }} />
15-
16-
## Ways to onboard traffic to Cloudflare
17-
18-
### GRE and IPsec tunnels
19-
20-
<Render
21-
file="tunnel-endpoints/gre-ipsec"
22-
params={{
23-
productName: "Magic Transit",
24-
tunnelsPath: "/magic-transit/reference/tunnels/",
25-
ciphersPath:
26-
"/magic-transit/reference/tunnels/#supported-configuration-parameters",
27-
}}
28-
/>
29-
30-
#### Anti-replay protection
31-
32-
<Render
33-
file="tunnel-endpoints/anti-replay"
14+
<Render file="configure-tunnels"
3415
params={{
16+
magicWord: "Magic Transit",
3517
productName: "Magic Transit",
18+
tunnelsAndEncapsulationPagePath: "/magic-transit/reference/tunnels/",
19+
ciphersPagePath: "/magic-transit/reference/tunnels/#supported-configuration-parameters",
3620
antiReplayPagePath: "/magic-transit/reference/anti-replay-protection/",
37-
}}
38-
/>
39-
40-
### Network Interconnect (CNI)
41-
42-
<Render
43-
file="tunnel-endpoints/cni"
44-
params={{
45-
magicName: "Magic Transit",
46-
cniPath: "Network Interconnect and Magic Transit",
47-
productLink: "/magic-transit/network-interconnect/",
48-
}}
49-
/>
50-
51-
## Add tunnels
52-
53-
<Render
54-
file="tunnel-endpoints/add-tunnels"
55-
params={{
56-
productName: "Magic Transit",
21+
cniLink: "/magic-transit/network-interconnect/",
5722
productPathDash: "Magic Transit > Configuration",
58-
healthCheck: "/magic-transit/how-to/tunnel-health-checks/",
59-
productPathProbe: "/magic-transit/reference/tunnel-health-checks/",
23+
updateHCFrequencyPage: "/magic-transit/how-to/tunnel-health-checks/",
24+
tunnelHealthChecksPage: "/magic-transit/reference/tunnel-health-checks/",
6025
antiReplayPagePath: "/magic-transit/reference/anti-replay-protection/",
6126
biVsUniHealthCheck: "unidirectional",
6227
tunnelHealthDash: "/magic-transit/how-to/check-tunnel-health-dashboard/",
6328
biVsUniHealthCheckDefaults: "For Magic Transit this option defaults to unidirectional"
64-
}}
65-
/>
66-
67-
## Bidirectional vs unidirectional health checks
68-
69-
<Render
70-
file="tunnel-endpoints/bi-uni-health-checks"
71-
params={{
72-
productPathProbe: "/magic-transit/reference/tunnel-health-checks/",
73-
}}
74-
/>
75-
76-
<Render file="tunnel-endpoints/mt-egress" />
77-
78-
### Legacy bidirectional health checks
79-
80-
<Render file="legacy-hc-system" />
29+
}} />
8130

8231
## Next steps
8332

src/content/docs/magic-wan/configuration/manually/how-to/configure-tunnels.mdx

Lines changed: 7 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -11,79 +11,25 @@ description: Cloudflare recommends two tunnels for each ISP and network location
1111

1212
import { GlossaryTooltip, Render } from "~/components";
1313

14-
<Render
15-
file="tunnel-endpoints/tunnel-endpoints"
16-
product="magic-transit"
17-
params={{ ipRange: "(this address space is also a link-local address)" }}
18-
/>
19-
20-
## Ways to onboard traffic to Cloudflare
21-
22-
### GRE and IPsec tunnels
23-
24-
<Render
25-
file="tunnel-endpoints/gre-ipsec"
26-
product="magic-transit"
27-
params={{
28-
productName: "Magic WAN",
29-
tunnelsPath: "/magic-wan/reference/tunnels/",
30-
ciphersPath:
31-
"/magic-wan/reference/tunnels/#supported-configuration-parameters",
32-
}}
33-
/>
34-
35-
#### Anti-replay protection
36-
37-
<Render
38-
file="tunnel-endpoints/anti-replay"
14+
<Render file="configure-tunnels"
3915
product="magic-transit"
4016
params={{
17+
ipRange: "(this address space is also a link-local address)",
4118
productName: "Magic WAN",
19+
tunnelsAndEncapsulationPagePath: "/magic-wan/reference/tunnels/",
20+
ciphersPagePath: "/magic-wan/reference/tunnels/#supported-configuration-parameters",
4221
antiReplayPagePath: "/magic-wan/reference/anti-replay-protection/",
43-
}}
44-
/>
45-
46-
### Network Interconnect (CNI)
47-
48-
<Render
49-
file="tunnel-endpoints/cni"
50-
product="magic-transit"
51-
params={{
52-
magicName: "Magic WAN",
53-
cniPath: "Network Interconnect (CNI)",
54-
productLink: "/magic-wan/network-interconnect/",
55-
}}
56-
/>
57-
58-
## Add tunnels
59-
60-
<Render
61-
file="tunnel-endpoints/add-tunnels"
62-
product="magic-transit"
63-
params={{
64-
productName: "Magic WAN",
22+
cniLink: "/magic-wan/network-interconnect/",
6523
productPathDash: "Magic WAN > Configuration",
66-
healthCheck: "/magic-wan/configuration/common-settings/tunnel-health-checks/",
67-
productPathProbe: "/magic-wan/reference/tunnel-health-checks/",
24+
updateHCFrequencyPage: "/magic-wan/configuration/common-settings/tunnel-health-checks/",
25+
tunnelHealthChecksPage: "/magic-wan/reference/tunnel-health-checks/",
6826
antiReplayPagePath: "/magic-wan/reference/anti-replay-protection/",
6927
biVsUniHealthCheck: "bidirectional",
7028
tunnelHealthDash: "/magic-wan/configuration/common-settings/check-tunnel-health-dashboard/",
7129
biVsUniHealthCheckDefaults: "For Magic WAN this option defaults to bidirectional"
7230
}}
7331
/>
7432

75-
## Bidirectional vs unidirectional health checks
76-
77-
<Render
78-
file="tunnel-endpoints/bi-uni-health-checks"
79-
product="magic-transit"
80-
params={{ productPathProbe: "/magic-wan/reference/tunnel-health-checks/" }}
81-
/>
82-
83-
### Legacy bidirectional health checks
84-
85-
<Render file="legacy-hc-system" product="magic-transit" />
86-
8733
## Next steps
8834

8935
- Now that you have set up your tunnel endpoints, you need to configure <GlossaryTooltip term="static route" link="/magic-wan/configuration/manually/how-to/configure-static-routes/">static routes</GlossaryTooltip> to route your traffic through Cloudflare. <br /> If you are connecting to Cloudflare through a [Direct CNI connection](/network-interconnect/express-cni/), you can [configure BGP routing](/magic-wan/configuration/manually/how-to/bgp-peering/) instead.

src/content/partials/magic-transit/tunnel-endpoints/add-tunnels.mdx renamed to src/content/partials/magic-transit/configure-tunnels.mdx

Lines changed: 80 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,67 @@
11
---
22
params:
3+
- magicWord?
4+
- ipRange?
35
- productName
6+
- tunnelsAndEncapsulationPagePath
7+
- ciphersPagePath
8+
- antiReplayPagePath
9+
- cniLink
410
- productPathDash
5-
- healthCheck
6-
- productPathProbe
11+
- updateHCFrequencyPage
12+
- tunnelHealthChecksPage
713
- antiReplayPagePath
814
- biVsUniHealthCheck
915
- tunnelHealthDash
1016
- biVsUniHealthCheckDefaults
1117
---
1218

13-
import { APIRequest, CURL, Details, Markdown, Render, TabItem, Tabs } from "~/components";
19+
import { APIRequest, CURL, Details, GlossaryTooltip, Render, TabItem, Tabs } from "~/components";
20+
21+
Cloudflare recommends two tunnels for each ISP and network location router combination, one per Cloudflare endpoint. Shortly after your onboarding kickoff call, Cloudflare will assign two Cloudflare endpoint addresses that you can use as the tunnel destinations on your network location's routers/endpoints.
22+
23+
To configure the tunnels between Cloudflare and your locations, you must provide the following data for each tunnel:
24+
25+
- **Tunnel name**: For GRE tunnels, the name must have 15 or fewer characters. IPsec tunnels have no character limit. For both GRE and IPsec tunnels, the name cannot contain spaces or special characters, and cannot be shared with other tunnels.
26+
- **Cloudflare endpoint address**: The public IP address of the Cloudflare side of the tunnel.
27+
- **Customer endpoint**: A public Internet routable IP address which is outside of the prefixes that Cloudflare will advertise on your behalf. These are generally IP addresses provided by your ISP. If you intend to use a physical or virtual connection like [Cloudflare Network Interconnect](/network-interconnect/), you do not need to provide endpoints because Cloudflare will provide them. <br/>
28+
This value is not required for <GlossaryTooltip term="IPsec tunnel">IPsec</GlossaryTooltip> tunnels, unless your router is using an <GlossaryTooltip term="Internet key exchange (IKE)">Internet Key Exchange (IKE)</GlossaryTooltip> ID of type `ID_IPV4_ADDR`.
29+
- **Interface address**: A 31-bit (recommended) or 30-bit subnet (`/31` or `/30` in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space:
30+
- `10.0.0.0/8`
31+
- `172.16.0.0/12`
32+
- `192.168.0.0/16`
33+
- `169.254.240.0/20` {props.ipRange}
34+
:::caution
35+
Make sure the prefixes are always within the allowed Cloudflare ranges, especially for cloud service providers that might automatically generate prefixes for you. Otherwise, the tunnel will not work.
36+
:::
37+
- **TTL**: Time to Live (TTL) in number of hops for the <GlossaryTooltip term="GRE tunnel">GRE</GlossaryTooltip> tunnel. The default value is 64.
38+
- **MTU**: Maximum transmission unit (MTU) in bytes for the GRE tunnel. The default value is 1476.
39+
40+
## Ways to onboard traffic to Cloudflare
41+
42+
### GRE and IPsec tunnels
43+
44+
You can use GRE or IPsec tunnels to onboard your traffic to {props.productName}, and set them up via the Cloudflare dashboard or the API. However, if you want to use the API, be sure to have your [account ID](/fundamentals/setup/find-account-and-zone-ids/) and [API key](/fundamentals/api/get-started/keys/#view-your-global-api-key) ready before you begin.
45+
46+
:::note
47+
IPsec tunnels only support Internet Key Exchange version 2 (IKEv2).
48+
:::
49+
50+
#### IPsec supported ciphers
51+
52+
Refer to <a href={props.tunnelsAndEncapsulationPagePath}>Tunnels and encapsulation</a> to learn more about the technical requirements for GRE and IPsec tunnels used in {props.productName}. In this page, you can also find the <a href={props.ciphersPagePath}>supported ciphers for IPsec</a>.
53+
54+
#### Anti-replay protection
55+
56+
If you use {props.productName} and <GlossaryTooltip term="anycast">anycast</GlossaryTooltip> IPsec tunnels, we recommend disabling anti-replay protection. This setting is disabled on Cloudflare's side by default. However, it can be enabled via the API or the Cloudflare dashboard for devices that do not support disabling it, including Cisco Meraki, Velocloud, and AWS VPN Gateway.
57+
58+
Refer to <a href={props.antiReplayPagePath}>Anti-replay protection</a> for more information on this topic, or [Add IPsec tunnels](#add-tunnels) below to learn how to enable this feature.
59+
60+
### Network Interconnect (CNI)
61+
62+
Beyond GRE and IPsec tunnels, you can also use Network Interconnect (CNI) to onboard your traffic to {props.productName}. Refer to <a href={props.cniLink}>Network Interconnect (CNI)</a> for more information.
63+
64+
## Add tunnels
1465

1566
<Render file="icmp-mfirewall" product="magic-transit" />
1667

@@ -29,9 +80,9 @@ import { APIRequest, CURL, Details, Markdown, Render, TabItem, Tabs } from "~/co
2980
8. In **Customer GRE endpoint**, enter your router's public IP address. This value is not needed if you intend to use a physical or virtual connection like Cloudflare Network Interconnect because Cloudflare will provide it.
3081
9. In **Cloudflare GRE endpoint**, enter the anycast address you received from your account team.
3182
10. Leave the default values for **TTL** and **MTU**.
32-
11. _(Optional)_ **Tunnel health checks** are enabled by default. If you disable Tunnel health checks, your tunnels will appear 100% down in your <a href={props.tunnelHealthDash}>tunnel health dashboard</a> even when working. Cloudflare will keep sending traffic through the tunnel, without the means to detect if the tunnel goes down. You will have to set up your own system to detect down tunnels, as Cloudflare will not be able to warn you about down tunnels. Refer to <a href={props.productPathProbe}>Tunnel health checks</a> for more information.
33-
12. _(Optional)_ If you keep **Tunnel health checks** enabled, choose the <a href={props.healthCheck}>**Health check rate**</a> for your tunnel. Available options are _Low_, _Medium_, and _High_.
34-
13. The **Health check type** defaults to _Reply_ and to creating an ICMP reply. If your firewall drops this type of packet for assuming it is a type of attack, change this option to _Request_ which will create an ICMP request. Refer to <a href={props.productPathProbe}>Tunnel health checks</a> for more information.
83+
11. _(Optional)_ **Tunnel health checks** are enabled by default. If you disable Tunnel health checks, your tunnels will appear 100% down in your <a href={props.tunnelHealthDash}>tunnel health dashboard</a> even when working. Cloudflare will keep sending traffic through the tunnel, without the means to detect if the tunnel goes down. You will have to set up your own system to detect down tunnels, as Cloudflare will not be able to warn you about down tunnels. Refer to <a href={props.tunnelHealthChecksPage}>Tunnel health checks</a> for more information.
84+
12. _(Optional)_ If you keep **Tunnel health checks** enabled, choose the <a href={props.updateHCFrequencyPage}>**Health check rate**</a> for your tunnel. Available options are _Low_, _Medium_, and _High_.
85+
13. The **Health check type** defaults to _Reply_ and to creating an ICMP reply. If your firewall drops this type of packet for assuming it is a type of attack, change this option to _Request_ which will create an ICMP request. Refer to <a href={props.tunnelHealthChecksPage}>Tunnel health checks</a> for more information.
3586
14. The **Health check direction** defaults to **{props.BiVsUniHealthCheck}** for {props.productName}. Refer to [Bidirectional vs unidirectional health checks](#bidirectional-vs-unidirectional-health-checks) for more details.
3687
15. _(Optional)_ **Health check target** is the customer end of the tunnel. This field is only visible when the **Health check direction** is set to _Unidirectional_.
3788
16. _(Optional)_ We recommend you test your tunnel before officially adding it. To test the tunnel, select **Test tunnels**.
@@ -47,9 +98,9 @@ import { APIRequest, CURL, Details, Markdown, Render, TabItem, Tabs } from "~/co
4798
7. In **IPv4 Interface address**, enter the internal IP address for your tunnel along with the interface's prefix length (either `/31` or `/30`). This is used to route traffic through the tunnel on the Cloudflare side. We recommend using an RFC1918 address scheme with a `/31` netmask, as it provides the most efficient use of IP address space.
4899
8. In **Customer endpoint**, enter your router's public IP address. This value is only required if your router is using an IKE ID of type `ID_IPV4_ADDR`.
49100
9. In **Cloudflare endpoint**, enter the anycast address you received from your account team.
50-
10. _(Optional)_ **Tunnel health checks** are enabled by default. If you disable Tunnel health checks, your tunnels will appear 100% down in your <a href={props.tunnelHealthDash}>tunnel health dashboard</a> even when working. Cloudflare will keep sending traffic through the tunnel, without the means to detect if the tunnel goes down. You will have to set up your own system to detect down tunnels, as Cloudflare will not be able to warn you about down tunnels. Refer to <a href={props.productPathProbe}>Tunnel health checks</a> for more information.
51-
11. _(Optional)_ If you keep **Tunnel health checks** enabled, choose the <a href={props.healthCheck}>**Health check rate**</a> for your tunnel. Available options are _Low_, _Medium_ and _High_.
52-
12. _(Optional)_ The **Health check type** defaults to _Reply_ and to creating an ICMP reply. If your firewall drops this type of packet for assuming it is a type of attack, change this option to _Request_ which will create an ICMP request. Refer to <a href={props.productPathProbe}>Tunnel health checks</a> for more information.
101+
10. _(Optional)_ **Tunnel health checks** are enabled by default. If you disable Tunnel health checks, your tunnels will appear 100% down in your <a href={props.tunnelHealthDash}>tunnel health dashboard</a> even when working. Cloudflare will keep sending traffic through the tunnel, without the means to detect if the tunnel goes down. You will have to set up your own system to detect down tunnels, as Cloudflare will not be able to warn you about down tunnels. Refer to <a href={props.tunnelHealthChecksPage}>Tunnel health checks</a> for more information.
102+
11. _(Optional)_ If you keep **Tunnel health checks** enabled, choose the <a href={props.updateHCFrequencyPage}>**Health check rate**</a> for your tunnel. Available options are _Low_, _Medium_ and _High_.
103+
12. _(Optional)_ The **Health check type** defaults to _Reply_ and to creating an ICMP reply. If your firewall drops this type of packet for assuming it is a type of attack, change this option to _Request_ which will create an ICMP request. Refer to <a href={props.tunnelHealthChecksPage}>Tunnel health checks</a> for more information.
53104
13. _(Optional)_ The **Health check direction** defaults to **{props.BiVsUniHealthCheck}** for {props.productName}. Refer to [Bidirectional vs unidirectional health checks](#bidirectional-vs-unidirectional-health-checks) for more details.
54105
14. _(Optional)_ **Health check target** is the customer end of the tunnel. This field is only visible when the **Health check direction** is set to _Unidirectional_.
55106

@@ -324,3 +375,23 @@ You can change this setting via the API with `"bidirectional"` or `"unidirection
324375
</Details>
325376

326377
</TabItem> </Tabs>
378+
379+
## Bidirectional vs unidirectional health checks
380+
381+
To check for tunnel health, Cloudflare sends a <a href={props.tunnelHealthChecksPage}>health check probe</a> consisting of ICMP (Internet Control Message Protocol) reply [packets](https://www.cloudflare.com/learning/network-layer/what-is-a-packet/) to your network. Cloudflare needs to receive these probes to know if your tunnel is healthy.
382+
383+
Cloudflare defaults to bidirectional health checks for Magic WAN, and unidirectional health checks for Magic Transit (direct server return). However, routing unidirectional ICMP reply packets over the Internet to Cloudflare is sometimes subject to drops by intermediate network devices, such as stateful firewalls. Magic Transit customers with egress traffic can modify this setting to bidirectional.
384+
385+
{ props.magicWord === "Magic Transit" && (
386+
<>
387+
<p>If you are a Magic Transit customer with egress traffic, refer to <a href="/magic-transit/reference/egress/" rel="noopener noreferrer">Magic Transit egress traffic</a> for more information on the technical aspects you need to consider to create a successful connection to Cloudflare.</p>
388+
</>
389+
)
390+
}
391+
392+
### Legacy bidirectional health checks
393+
394+
For customers using the legacy health check system with a public IP range, Cloudflare recommends:
395+
396+
- Configuring the tunnel health check target IP address to one within the `172.64.240.252/30` prefix range.
397+
- Applying a policy-based route that matches [packets](https://www.cloudflare.com/learning/network-layer/what-is-a-packet/) with a source IP address equal to the configured tunnel health check target (for example `172.64.240.253/32`), and route them over the tunnel back to Cloudflare.

src/content/partials/magic-transit/legacy-hc-system.mdx

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/content/partials/magic-transit/tunnel-endpoints/anti-replay.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/content/partials/magic-transit/tunnel-endpoints/bi-uni-health-checks.mdx

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)