Configure cloud on-ramps
BetaMagic Cloud Networking (beta) allows you to create on-ramps from your cloud networks to Magic WAN. Cloudflare will create virtual private network (VPN) tunnels between Magic WAN and your cloud provider, configuring both sides of the connection on your behalf. Cloudflare orchestrates the cloud provider's native VPN functionality, without requiring deployment of any additional compute virtual machines (VMs).
There are two types of on-ramps: single virtual private cloud (VPC) and hubs.
Before creating on-ramps from your cloud networks to Magic WAN, make sure you:
- Have a Magic Cloud Networking account. Contact your account team to learn more.
- Went through process of setting up your cloud provider.
- Have the correct cloud resources. Refer to Reference to check resource by cloud provider.
Magic Cloud Networking has the following cloud on-ramps integrations:
- AWS (single VPC and hubs)
- Azure (single VPC)
- GCP (single VPC)
Refer to Reference to learn more about how Cloudflare orchestrates VPN connectivity to your cloud networks.
Choose this option if you have a single virtual private cloud (VPC) in your cloud to connect to Magic WAN. To set up a single-VPC on-ramp:
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Cloud on-ramps.
- Select Add new on-ramp.
- Go to Connect an existing VPC to Cloudflare > Select.
- Give your new on-ramp a name and a description (optional), then select Continue.
- From the drop-down menu, choose your cloud provider. You can choose between AWS, GCP and Azure. Then, select Continue.
- Select the network that you want to connect to. This list comes from the cloud integrations you have already set up. When you are done, select Continue.
- Configure route propagation shows where Cloudflare will install the new routes. Installing these routes is required to correctly configure both Magic WAN and your cloud provider, and ensure successful communication between them:
- Add routes for your Magic WAN address space to your cloud network: Select this option to install routes for reaching Magic WAN in your cloud network's route tables (refer to Magic WAN Address Space to learn what routes are installed and how to customize them). If you prefer to do this manually, unselect this option.
- Add routes for your cloud network to Magic WAN: Select this option to create routes for reaching your cloud network in Magic WAN.
- Select Continue. Applying your settings might take a few seconds to complete.
- Review the changes in your cloud environment, and select Approve changes.
You have successfully created your Magic WAN on-ramp. However, on-ramp creation can take up to an hour before you can use it.
If you want to connect multiple VPCs to Magic WAN, the best way to connect them is using a hub. A hub is a cloud VPN gateway that peers with multiple VPCs, allowing them to share a VPN tunnel to Magic WAN. Each cloud provider has their own term for hubs, so refer to your cloud provider for more information.
Depending on how you have set up your cloud provider, you can:
- Connect to an existing hub: Choose this option if you already have a VPN hub in your cloud and you want to connect it to Magic WAN.
- Create a new hub: Choose this option if you want to create a new hub and connect it to Magic WAN.
When you configure a hub on-ramp, Cloudflare always manages the VPN tunnel between Magic WAN and the hub. Optionally, you can also choose to have Cloudflare manage peering with VPCs and/or with other hubs:
- Manage VPC peering: If you enable this option, Cloudflare will attach your chosen VPCs to the hub.
- Manage hub peering: Hubs are regional, so in order to connect VPCs attached to hubs in different regions, those hubs need to be peered. If you enable this option, Cloudflare will peer your chosen hubs to this hub.
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Cloud on-ramps.
- Select Add new on-ramp.
- Go to Connect an existing hub to Cloudflare > Select.
- Give your new on-ramp a name and a description (optional), then select Continue.
- From the drop-down menu, choose your cloud provider. You can choose between AWS, GCP, and Azure. Then, select Continue.
- Choose an existing hub. This list comes from the cloud integrations you have already set up. When you are done, select Continue.
- (Optional) In VPC peering configuration, you can enable Manage VPC peering. This allows Cloudflare to attach your chosen VPCs to the hub:
- Select Manage VPC peering to enable this feature.
- Choose the VPCs you want Cloudflare to attach to the hub.
- Select Continue.
- (Optional) In Configure hub peering, you can enable Manage hub peering. Enabling this option allows Cloudflare to attach remote hubs you have chosen to this hub (establishing connectivity between VPCs attached to any of the peered hubs):
- Select Manage hub peering to enable this feature.
- Select the remote hubs you want Cloudflare to attach to this hub.
- Select Continue.
- Configure route propagation shows where Cloudflare will install the new routes. Installing these routes is required to correctly configure both Magic WAN and your cloud provider, and ensure successful communication between them:
- Add routes for your Magic WAN address space to your cloud network: Select this option to install routes for reaching Magic WAN in your cloud network's route tables (refer to Magic WAN Address Space to learn what routes are installed and how to customize them). If you prefer to do this manually, unselect this option.
- Add routes for your cloud network to Magic WAN: Select this option to create routes for reaching your cloud network in Magic WAN.
- Select Continue. Applying your settings might take a few seconds to complete.
- Review the changes in your cloud environment, and select Approve changes.
You have successfully created your Magic WAN on-ramp. However, on-ramp creation can take up to an hour before you can use it.
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Cloud on-ramps.
- Select Add new on-ramp.
- Go to Create a new hub & connect it to Cloudflare > Select.
- Give your new on-ramp a name and a description (optional), then select Continue.
- Configure your cloud in Select your cloud details:
- From the drop-down menu, choose your cloud provider. You can choose between AWS, GCP, and Azure.
- Choose an existing integration. This list comes from the cloud integrations you have already set up.
- Choose a region in which to create the new hub.
- Select Continue.
- (Optional) In VPC peering configuration, you can enable Manage VPC peering. This allows Cloudflare to attach your chosen VPCs to the hub:
- Select Manage VPC peering to enable this feature.
- Choose the VPCs you want Cloudflare to attach to the hub.
- Select Continue.
- (Optional) In Configure hub peering, you can enable Manage hub peering. Enabling this option allows Cloudflare to attach remote hubs you have chosen to this hub (establishing connectivity between VPCs attached to any of the peered hubs):
- Select Manage hub peering to enable this feature.
- Select the remote hubs you want Cloudflare to attach to this hub.
- Select Continue.
- Configure route propagation shows where Cloudflare will install the new routes. Installing these routes is required to correctly configure both Magic WAN and your cloud provider, and ensure successful communication between them:
- Add routes for your Magic WAN address space to your cloud network: Select this option to install routes for reaching Magic WAN in your cloud network's route tables (refer to Magic WAN Address Space to learn what routes are installed and how to customize them). If you prefer to do this manually, unselect this option.
- Add routes for your cloud network to Magic WAN: Select this option to create routes for reaching your cloud network in Magic WAN.
- Select Continue. Applying your settings might take a few seconds to complete.
- Review the changes in your cloud environment, and select Approve changes.
You have successfully created your Magic WAN on-ramp. However, on-ramp creation can take up to an hour before you can use it.
You can download a Terraform configuration for a cloud on-ramp. You might want to do this to:
- Review the proposed configuration for an on-ramp before deploying it with Cloudflare.
- Deploy the on-ramp using your own infrastructure-as-code pipeline instead of deploying it with Cloudflare.
The download will contain two files:
main.tf
: Terraform configuration for the new resources needed to create the on-ramp.instructions.txt
: Instructions for modifying resources that already exist in your cloud environment.
If you intend to plan and apply the downloaded configuration using Terraform, you will need to use the Cloudflare Terraform provider (in addition to the Terraform provider for the on-ramp's cloud service provider). Use your Cloudflare Global API Key, not an API Token.
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Cloud on-ramps.
- Select Add new on-ramp and begin the Create a Magic WAN cloud on-ramp workflow as normal.
- After the Configure route propagation step, select View download options instead of selecting Continue.
- Select a download option:
- Choose Download file and continue to download the Terraform configuration, review the configuration, and then continue deploying the on-ramp with Cloudflare.
- Choose Download file and exit to download the Terraform configuration that you will apply yourself.
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Cloud on-ramps.
- Select the three dots for the on-ramp you want to download > Download as Terraform.
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Cloud on-ramps.
- Select the on-ramp you want to edit.
- Select Edit in the side panel.
- In Basic information, you can change the name and description of your on-ramp. Select Save when you are finished.
- In Configurations, you can modify where the required routes are installed. Select Continue.
- Select Save and review after making changes.
- Review your settings, and select Approve changes.
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Cloud on-ramps.
- Select the on-ramp you want to delete.
- Select Edit in the side panel.
- Choose Detach or Destroy to proceed:
- Detach: Cloudflare will stop managing the cloud resources that were created to build this on-ramp, but will leave them in place. On-ramp connectivity will not be impacted.
- Destroy: Cloudflare will delete the resources that were created to build this on-ramp in the cloud provider, if possible. Resources cannot be deleted if other resources depend upon them. For example, if an AWS Customer Gateway was created for this on-ramp, but was subsequently used in a second on-ramp, destroying this on-ramp will not destroy the AWS Customer Gateway.
By default, Cloudflare installs the following summarized routes in your cloud route tables to direct traffic to Magic WAN:
To override the defaults with custom prefixes:
- Log in to the Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Configuration.
- Select Magic WAN Address Space.
- Delete the prefixes, and enter your custom ones.
- When you are finished, select Save changes.
To install a default route to send all traffic to Magic WAN, enter 0.0.0.0/0
(on Azure, enter 0.0.0.0/1
and 128.0.0.0/1
).
You can view estimated costs associated with your cloud resources in the Cloudflare dashboard.
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Cloud on-ramps.
- Find the cloud on-ramp for which you want to check the estimated costs.
- Select the three dots > Associated Resources.
- In the Associated Resources page, you can view the estimated monthly costs for all the resources associated with the on-ramp you chose. You can also search for a specific resource using the search box.