Magic Transit integration
Last updated May 7, 2026 allows you to keep Magic Transit disabled during normal operations and activate it only when you need DDoS protection. Network Flow monitors your traffic while Magic Transit is off and detects attacks. When an attack is detected, you can enable Magic Transit automatically or manually.
You can create Network Flow rules that monitor specific IP prefixes for DDoS attacks. When an attack is detected, Cloudflare notifies you by email, webhook, or PagerDuty.
If you enable auto-advertisement on a rule, Magic Transit activates automatically to protect the targeted prefixes. You can enable auto-advertisement for individual Network Flow rules through the dashboard or API.
After Magic Transit activates and your traffic flows through Cloudflare, Cloudflare blocks malicious DDoS traffic. Your origin servers receive only clean traffic through IPsec or GRE tunnels.
The following diagrams illustrate this process:



Activate IP auto-advertisement
Before a rule can automatically activate Magic Transit, you must enable IP advertisement for the relevant prefixes. You can do this through the dashboard or the API.
Dashboard
To activate IP advertisement through the Cloudflare dashboard, refer to Configure dynamic advertisement.
API
To activate IP advertisement through the API, refer to the IP Address Management Dynamic Advertisement API.
Network Flow rules
To create Network Flow rules with auto-advertisement, refer to Rule Auto-Advertisement.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/network-flow/magic-transit-integration/#page","headline":"Magic Transit integration","description":"Integrate Network Flow with Magic Transit.","url":"https://developers.cloudflare.com/network-flow/magic-transit-integration/","inLanguage":"en","image":"https://developers.cloudflare.com/network-flow/magic-transit-integration/og.png?v=3528053b1b4b0ce8","dateModified":"2026-05-07","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":["Integration"]}
description: Network Flow features available on the free tier. title: Free version image: https://developers.cloudflare.com/network-flow/network-flow-free/og.png?v=6cd0f05235d95e3c
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/network-flow/llms.txt
Use this file to discover all available pages before exploring further.
