What Is Spectrum? Protecting TCP/UDP Applications
On this page9 items
The previous page looked at the Magic services, which put an entire corporate network on Cloudflare. All of them are large-scale systems that assume an Enterprise contract, but the need to “protect traffic that isn’t HTTP” also comes up on a much smaller scale: game servers, SSH, mail servers, and so on.
Spectrum, covered on this page, is a service that lets you put such TCP/UDP applications on Cloudflare one at a time. It’s easiest to understand as taking the “orange cloud” idea from Chapter 1 and extending it to traffic other than the web.
What you’ll learn on this page#
- Why the orange cloud (the regular proxy) can’t protect anything other than HTTP
- How Spectrum works: a layer 4 reverse proxy
- What it protects: DDoS mitigation and hiding IP addresses
- What’s available on each plan (Pro / Business / Enterprise)
- When to use it versus Magic Transit or Cloudflare Tunnel
The orange cloud’s weakness: it can’t protect anything but HTTP#
As covered on Chapter 1’s proxy page, traffic to a domain with the orange cloud enabled is received by Cloudflare on its behalf, and the CDN, WAF, and DDoS protection kick in. But this mechanism assumes web traffic: HTTP and HTTPS.
Servers run more than just the web, though. SSH (remote server administration), game servers, mail, remote desktop, and so on communicate using protocols and ports other than HTTP. Their DNS records couldn’t be orange-clouded and had to be run as gray cloud (DNS only). That means the server’s IP address was exposed to the world and left defenseless against DDoS attacks.
In online gaming in particular, DDoS attacks aimed at harassing opponents have been a long-standing problem. Websites could be protected, but game servers couldn’t. Spectrum fills that gap.
What is Spectrum? A layer 4 reverse proxy#
Spectrum is a layer 4 (transport layer) reverse proxy in which Cloudflare receives TCP/UDP traffic on your behalf and relays it. Whereas the regular proxy processes traffic with an understanding of the HTTP contents (layer 7), Spectrum carries the TCP/UDP stream as is, regardless of which application it belongs to. That’s why it can handle SSH, games, and mail alike.
To use it, you just register an “application.” Specify the target domain, the port Cloudflare listens on (the edge port), and the origin server to forward to, and traffic is protected through the following flow.
- Users connect by domain name. DNS returns a Cloudflare IP address, and via Anycast the traffic reaches the nearest Cloudflare data center
- At Cloudflare’s edge, layer 3/4 DDoS attacks are absorbed and blocked. It’s the same foundation as the DDoS protection covered in Chapter 2
- Only legitimate traffic is relayed to the origin server

There are two main things you get from this. One is DDoS protection. The other is hiding your IP address: only Cloudflare’s IP addresses are visible from outside, so attacks aimed directly at the origin become impossible. In addition, for TCP apps you can use TLS termination (encryption handled on Cloudflare’s side) and route optimization with Argo Smart Routing (some of this is Enterprise-only, as described below).
Which plans can use it#
Spectrum is a feature for paid plans (as of August 2026; it isn’t available on the Free plan).
- Pro: Supports SSH and Minecraft servers. Up to 5 GB of data transfer per month is free
- Business: Adds RDP (remote desktop) to the above. Up to 10 GB per month is free
- Enterprise (add-on contract): Supports any TCP/UDP application on any port
Usage beyond the free allowance is billed per GB. Options such as freely specifying the origin port, Proxy Protocol, IP Access Rules, detailed TLS termination settings, and Argo Smart Routing are Enterprise-only. Pro/Business are for “easily protecting specific use cases,” while Enterprise is for “putting anything on it.”
How it differs from Magic Transit#
Magic Transit, on the previous page, was also a service that “protects things other than the web from DDoS.” The difference is the unit of protection.
| Spectrum | Magic Transit | |
|---|---|---|
| Unit of protection | One app (domain + port) | An entire network (IP address range) |
| Prerequisite | A domain managed on Cloudflare | Your own IP address block |
| Main targets | Individual services such as game servers and SSH | Infrastructure of companies and carriers |
| Plan | Pro and up (limited support) to Enterprise | Enterprise |
Spectrum’s convenience is that you can use it without owning an IP address range, as long as your domain is on Cloudflare. Conversely, if what you want to protect is a whole network of dozens of servers, Spectrum’s one-app-at-a-time registration can’t keep up, and that’s where Magic Transit comes in.
Points beginners should watch out for#
- For SSH that only you use, Tunnel is the way to go: Spectrum suits services like game servers where “an unspecified number of people connect over TCP/UDP.” For SSH, remote desktop, or a NAS used only by you or your team, the combination of Cloudflare Tunnel and Access covered in Chapter 3 is free and even adds authentication
- The origin sees connections as coming from Cloudflare: Because Cloudflare receives traffic on your behalf, the server-side logs record Cloudflare’s IP addresses. Features that identify users by source IP (such as game ban features) require support for something like Proxy Protocol (Enterprise)
- Watch out for billing based on data transfer: Use cases with large amounts of data, such as games and streaming, quickly exceed the free allowance. Estimate your transfer volume first
- UDP and arbitrary ports are Enterprise: On Pro/Business, only the fixed use cases of SSH, Minecraft, and RDP are available. Be careful not to sign up expecting “you can put anything on it”
Related services#
- Proxy (orange cloud): The same idea for web traffic. Spectrum is its layer 4 version (Chapter 1)
- DDoS Protection: The foundation of Spectrum’s defense (Chapter 2)
- Magic Transit: The large-scale version that protects an entire network (previous page)
- Cloudflare Tunnel: For publishing services with a limited set of users, this is free and secure (Chapter 3)
- Load Balancing: Distributing traffic across multiple servers. Can be combined with Spectrum (next page)
Summary#
- Spectrum is a layer 4 reverse proxy that routes TCP/UDP apps through Cloudflare
- It provides DDoS protection and IP hiding for SSH, game servers, mail, and other things the orange cloud couldn’t protect
- You use it simply by registering an “application” with a domain and an edge port
- Pro supports SSH and Minecraft, Business adds RDP, and usage beyond the free transfer allowance is billed per use. Arbitrary TCP/UDP is an Enterprise add-on
- Use Tunnel + Access for limited-user cases and Magic Transit for whole networks