
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Sat, 04 Apr 2026 05:41:39 GMT</lastBuildDate>
        <item>
            <title><![CDATA[From IP packets to HTTP: the many faces of our Oxy framework]]></title>
            <link>https://blog.cloudflare.com/from-ip-packets-to-http-the-many-faces-of-our-oxy-framework/</link>
            <pubDate>Thu, 30 Mar 2023 13:00:00 GMT</pubDate>
            <description><![CDATA[ We have recently introduced Oxy, our Rust-based framework for proxies powering many Cloudflare services and products. Today, we will explain why and how it spans various layers of the OSI model, by handling directly raw IP packets, TCP connections and UDP payloads ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Grcs0D3SWn2QqZ6Clo5ua/4c71120829ce6d992a02faab0119b20c/image2-27.png" />
            
            </figure><p>We have recently <a href="/introducing-oxy/">introduced Oxy</a>, our Rust-based framework for proxies powering many Cloudflare services and products. Today, we will explain why and how it spans various layers of the <a href="https://en.wikipedia.org/wiki/OSI_model">OSI model</a>, by handling directly raw IP packets, TCP connections and UDP payloads, all the way up to application protocols such as HTTP and <a href="https://www.cloudflare.com/learning/access-management/what-is-ssh/">SSH</a>.</p>
    <div>
      <h3>On-ramping IP packets</h3>
      <a href="#on-ramping-ip-packets">
        
      </a>
    </div>
    <p>An application built on top of Oxy defines — in a configuration file — the on-ramps that will accept ingress traffic to be proxied to some off-ramp. One of the possibilities is to on-ramp raw IP packets. But why operate at that layer?</p><p>The answer is: <a href="/introducing-cloudflare-one/">to power Cloudflare One</a>, our network offering for customers to extend their private networks — such as offices, data centers, <a href="https://www.cloudflare.com/learning/cloud/what-is-cloud-networking/">cloud networks</a> and roaming users — with the Cloudflare global network. Such private networks operate based on <a href="/stronger-bridge-to-zero-trust/">Zero Trust principles</a>, which means every access is authenticated and authorized, contrasting with legacy approaches where you can reach every private service after authenticating once with the Virtual Private Network.</p><p>To effectively extend our customer’s private network into ours, we need to support arbitrary protocols that rely on the Internet Protocol (IP). Hence, we on-ramp Cloudflare One customers’ traffic at (OSI model) layer 3, as a stream of IP packets. Naturally, those will often encapsulate TCP streams and UDP sessions. But nothing precludes other traffic from flowing through.</p>
    <div>
      <h3>IP tunneling</h3>
      <a href="#ip-tunneling">
        
      </a>
    </div>
    <p>Cloudflare’s operational model dictates that <a href="/how-cloudflares-architecture-allows-us-to-scale-to-stop-the-largest-attacks/">every service, machine and network</a> be operated in an homogeneous way, usable by every one of our customers the same way. We essentially have a gigantic multi-tenanted system. Simply on-ramping raw IP packets does not suffice: we must always move the IP packets within the scope of the tenant they belong to.</p><p>This is why we introduced the concept of IP tunneling in Oxy: every IP packet handled has context associated with it; at the very least, the tenant that it belongs to. Other arbitrary contexts can be added, but that is up to each application (built on top of Oxy) to define, parse and consume in its Oxy hooks. This allows applications to <a href="/introducing-oxy/">extend and customize</a> Oxy’s behavior.</p><p>You have probably heard of (or even used!) <a href="/warp-for-desktop/">Cloudflare Zero Trust WARP</a>: a client software that you can install on your device(s) to create virtual private networks managed and handled by Cloudflare. You begin by authenticating with your Cloudflare One account, and then the software will on-ramp your device’s traffic through the nearest Cloudflare data center: either to be upstreamed to Internet public IPs, or to other Cloudflare One connectors, such as <a href="/warp-to-warp/">another WARP device</a>.</p><p>Today, WARP routes the traffic captured in your device (e.g. your smartphone) via a WireGuard tunnel that is terminated in a server in the nearest Cloudflare data center. That server then opens an IP tunnel to an Oxy instance running on the same server. To convey context about that traffic, namely the <a href="/gateway-swg-3/">identity of the tenant</a>, some context must be attached to the IP tunnel.</p><p>For this, we use a <a href="https://man7.org/linux/man-pages/man7/unix.7.html">Unix SOCK_SEQPACKET</a>, which is a datagram-oriented socket exposing a connection-based interface with reliable and ordered delivery — it only accepts connections locally within the machine where it is bound to. Oxy receives the context in the first datagram, which the application parses — could be any format the application using Oxy desires. Then all subsequent datagrams are assumed to be raw self-describing IP packets, with no overhead whatsoever.</p><p>Another example are the on-ramps of <a href="/magic-wan-firewall/">Magic WAN</a>, such as <a href="https://www.cloudflare.com/learning/network-layer/what-is-gre-tunneling/">GRE</a> or <a href="https://www.cloudflare.com/learning/network-layer/what-is-ipsec/">IPsec</a> tunnels, which also bring raw IP packets from customer’s networks to Cloudflare data centers. Unlike WARP, where its IP packets are decapsulated in user space, for GRE and IPsec we rely on the Linux kernel to do the job for us. Hence, we have no state whatsoever between two consecutive IP packets coming from the same customer, as the Linux kernel is routing them independently.</p><p>To accommodate the differences between IP packet handling in user space and the kernel, Oxy differentiates two types of IP tunnels:</p><ul><li><p><i>Connected IP tunnels</i> — as explained for WARP above, where the context is passed once, in the first datagram of the IP Tunnel SEQPACKET connection</p></li><li><p><i>Unconnected IP tunnels</i> — used by Magic WAN, where each IP packet is encapsulated (using GUE, i.e. <a href="https://datatracker.ietf.org/meeting/91/materials/slides-91-nvo3-1">Generic UDP Encapsulation</a>) to accommodate the context and unconnected UDP sockets are used</p></li></ul><p>Encapsulating every IP packet comes at the cost of extra CPU usage. But moving the packet around to and from an Oxy instance does not change much regardless of the encapsulation, as we do not have <a href="https://www.cloudflare.com/learning/network-layer/what-is-mtu/">MTU limitations</a> inside our data centers. This way we avoid causing IP packet fragmentation, whose reassembly takes a toll on CPU and Memory usage.</p>
    <div>
      <h3>Tracking IP flows</h3>
      <a href="#tracking-ip-flows">
        
      </a>
    </div>
    <p>Once IP packets arrive to Oxy, regardless of how they on-ramp, we must decide what to do with them. We decided to rely on the idea of IP flows, as that is inherent to most protocols: a point to point interaction will generally be bounded in time and follow some type of state machine, either known by the transport or by the application protocol.</p><p>We perform flow tracking to detect IP flows. When handling an on-ramped IP packet, we parse its IP header and possible transport (i.e. OSI Model layer 4) header. We use the excellent <a href="https://crates.io/crates/etherparse">etherparse Rust crate</a> for this purpose, which parses the flow signature, with a source and destination IP address, ports (optional) and protocol. We then look up whether there is already a known IP flow for that signature: if so, then the packet is proxied through the path already determined for that flow towards its off-ramp. If the flow is new, then its upstream route is computed and memoized for future packets. This is in essence what routers do, and to some extent Oxy handling of IP packets is meant to operate as a router.</p><p>The interesting thing about tracking IP flows is that we can now expose their lifetime events to the application built on top of Oxy, via its hooks. Applications can then use these events for interesting operations, such as:</p><ul><li><p>Applying <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">Zero Trust principles</a> before allowing the IP flow through, such as <a href="https://developers.cloudflare.com/cloudflare-one/policies/filtering/">our Secure Web Gateway policies</a></p></li><li><p>Emitting <a href="https://developers.cloudflare.com/cloudflare-one/analytics/logs/gateway-logs/">audit logs</a> that collect the decisions taken at the start of the IP flow</p></li><li><p>Collecting metadata about the traffic processed by the time the IP flow ends, e.g., to support billing calculations</p></li><li><p>Computing routing decisions of where to send the IP flow next, e.g. to another Cloudflare product/service, or off-ramped to the Internet, or to another Cloudflare One connector</p></li></ul>
    <div>
      <h3>From an IP flow to a TCP stream</h3>
      <a href="#from-an-ip-flow-to-a-tcp-stream">
        
      </a>
    </div>
    <p>You would think that most applications do not handle IP packets directly. That is a good hunch, and also a fact at Cloudflare: many systems operate at the application layer (OSI Model layer 7) where they can inspect traffic in a way much closer to what the end user is perceiving.</p><p>To get closer to that reality, Oxy can upgrade an IP flow to the transport layer (OSI Model layer 4). We first consider what this means for the case of TCP traffic. The problem that we want to solve is to process a given stream of raw IP packets, with the same TCP flow signature initiating a <a href="https://www.cloudflare.com/learning/ddos/glossary/tcp-ip/">TCP handshake</a>, and obtain as a result a TCP connection streaming data. Hence, we need a TCP protocol implementation that can be used from userspace.</p><p>The best Rust-native implementation is the <a href="https://crates.io/crates/smoltcp">smoltcp</a> crate. However, its stated objectives do not match our needs, as it does not implement many of the performance and reliability enhancements of TCP that are expected of a first-class TCP, therefore not sufficing for the sheer amount of traffic and demands we have.</p><p>Instead, we rely on the Linux kernel to help us here. After all, it has the most battle-tested TCP protocol implementation in the world.</p><p>To leverage that, we set up a <a href="https://www.kernel.org/doc/html/v5.8/networking/tuntap.html">TUN interface</a>, and add an IP route to forward traffic to that interface (more details below as to what IPs to use). A TUN interface is a virtual network device whose network data is generated by user-programmable software, rather than a device driver for a physically-connected network adapter. But otherwise it looks and works like a physical network adapter for all purposes.</p><p>We write the IP packets — meant to be <i>upgraded</i> to a TCP stream — to the file descriptor backing the TUN interface. However, that’s not enough, as the kernel in our machines will drop those packets since customer’s IP addresses only make sense in their infrastructure.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tFfWzjpKd9CB0An7BwDY5/e77a2dd9597c5a26bded5b251c66ab40/From-IP-flow-to-TCP-stream.png" />
            
            </figure><p>Transforming raw IP packets into a TCP stream</p><p>The step we are missing is that those packets must be transformed, i.e. <a href="https://en.wikipedia.org/wiki/Network_address_translation">Network Address Translated</a> (NAT), so that the kernel routes them into the TUN interface. Hence, Oxy maintains its own stateful NAT: every IP flow desired to be upgraded to a TCP stream must claim a NAT slot (to be returned when the TCP stream finishes), and have its packets’ addresses rewritten for the IPs that the TUN interface route encompasses.</p><p>Once packets flow into the TUN interface with the right addresses, the kernel will process them as if they had entered the machine through your network card. This means that you can now bind a TCP listener to accept TCP connections in the IP address for which the NAT-ed IP packets are destined to, and <i>voilà</i>, we have our IP flows upgraded to TCP streams.</p><p>We are left with one question: what IP address should the NAT use? One option is to just reserve some machine-local IP address and hope that no other application running in that machine uses it, as otherwise unexpected traffic will show up in our TUN device.</p><p>Instead, we chose to not have to worry about that at all by relying on <a href="https://man7.org/linux/man-pages/man7/network_namespaces.7.html">Linux network namespaces</a>. A network namespace provides you with an isolated network in a machine, acting as a virtualization layer provided by the kernel. Even if you do not know what this is, you are likely using it, e.g. via Docker.</p><p>Hence, Oxy dynamically starts a network namespace to run its TUN interface for upgrading IP flows, where it can use all the local IP space and ports freely. After all, those TCP connections only matter locally, between Oxy’s NAT and Oxy’s L4 proxy.</p><p>An interesting aspect here is that the Oxy application itself runs in the default/root namespace, making it easily reachable for on-ramping traffic, and also able to off-ramp traffic to other services operating on the same machine in the default/root namespace. But that raises the question: how is Oxy able to operate simultaneously in the root namespace as well as in the namespace dedicated to upgrading IP flows to TCP connections? The trick is to:</p><ul><li><p>Run the Oxy-based process in the root namespace, without any special permissions (no elevated permissions required).</p></li><li><p>That process calls <a href="https://man7.org/linux/man-pages/man2/clone.2.html">clone</a> into a new unnamed user and network namespace.</p></li><li><p>The child (cloned) and parent (original) processes communicate via a paired pipe.</p></li><li><p>The child brings up the TUN interface and establishes the IP routes to it.</p></li><li><p>The child process binds a TCP listener on an IP address that is bound to the TUN interface and passes that file descriptor to the parent process using <a href="/know-your-scm_rights/">SCM_RIGHTS</a>.</p></li></ul><p>This way, the Oxy process will now have a TCP listener, to obtain the upgraded IP flow connections from, while running in the default namespace and despite that TCP listener — and any connections accepted from it — operating in an unnamed dynamically created namespace.</p>
    <div>
      <h3>From a TCP stream to HTTP</h3>
      <a href="#from-a-tcp-stream-to-http">
        
      </a>
    </div>
    <p>Once Oxy has a TCP stream, it may also <i>upgrade</i> it, in a sense, to be handled as HTTP traffic. Again, the framework provides the capabilities, but it is up to the application (built on top of Oxy) to make the decision. Analogously to the IP flow, the TCP stream start also triggers a hook to let the application know about a new connection, and to let it decide what to do with it. One of the choices is to treat it as HTTP(S) traffic, at which point Oxy will pass the connection through a <a href="https://crates.io/crates/hyper">Hyper server</a> (possibly also doing TLS if necessary). If you are curious about this part, then rest assured we will have a blog post focused just on that soon.</p>
    <div>
      <h3>What about UDP</h3>
      <a href="#what-about-udp">
        
      </a>
    </div>
    <p>While we have been focusing on TCP so far, all of the capabilities implemented for TCP are also supported for UDP as well. We’ve glossed over it so far because it is easier to handle, since converting an IP packet to UDP payloads requires only stripping the IP and UDP headers. We do this in Oxy logic, in user space, thereby replacing the idea employed for TCP that relies on the TUN interface. Everything else works the same way across TCP and UDP, with UDP traffic potentially being HTTPS for the case of QUIC-based HTTP/3.</p>
    <div>
      <h3>From TCP/UDP back to IP flow</h3>
      <a href="#from-tcp-udp-back-to-ip-flow">
        
      </a>
    </div>
    <p>We have been looking at IP packets on-ramping in Oxy and converting from IP flows to TCP/UDP. Eventually that traffic is sent to an upstream that will respond back, and so we ought to obtain resulting IP packets to send to the client. This happens quite naturally in the code base as we only need to revert the operation done in the <i>upgrade</i>:</p><ul><li><p>For UDP, we add the IP and UDP headers to the payload of each datagram and thereby obtain the IP packet to send to the client.</p></li><li><p>For TCP, writing to the upgraded TCP socket causes the kernel to generate IP packets routed to the TUN interface. We read these packets from the TUN interface and <i>undo</i> the NAT operation explained above — applied to packets being written to the TUN interface — thereby obtaining the IP packet to send to the client.</p></li></ul><p>More interestingly, the application built on top of Oxy may also define that TCP/UDP traffic (handled as layer 4) is to be <i>downgraded</i> to IP flow (i.e. layer 3). To imagine where this would be usable, consider another Cloudflare One example, where a WARP client establishes an SSH session to a remote WARP device (which is <a href="/warp-to-warp/">now possible</a>) and has configured <a href="/ssh-command-logging/">SSH command audit logging</a> — in that case, we will have the following steps:</p><ol><li><p>On-ramp the IP packets from WARP client device into the Oxy application.</p></li><li><p>Oxy tracks the IP flows; per application mandate, then Oxy checks if it is a TCP IP flow with destination port 22, and as such it upgrades to TCP connection.</p></li><li><p>The application is given control of the TCP connection and, in this case, <a href="https://developers.cloudflare.com/cloudflare-one/policies/filtering/network-policies/ssh-logging/">our Secure Web Gateway</a> (an Oxy application) parses the traffic to perform the SSH command logging.</p></li><li><p>Since the upstream is determined to be another WARP device, Oxy is mandated to <i>downgrade</i> the TCP connection to IP packets, so that they can be off-ramped to the upstream as such.</p></li></ol><p>Therefore, we need to provide the capability to do step 4, which we haven’t described yet. For UDP the operation is trivial: add or remove the IP/UDP headers as necessary.</p><p>For TCP, we will again resort to (another) TUN interface. This is slightly more complicated than upgrading, because when upgrading we use a single TCP listener from the network namespace where all upgraded connections appear, whereas to downgrade we need a TCP client connection from the network namespace per downgraded connection. Therefore we need to interact with the network namespace to obtain these <i>on-demand</i> TCP client connections at runtime, as explained next, making the process to downgrade more convoluted.</p><p>To enable that, we rely on the paired pipe maintained between the Oxy (parent) process and the cloned (child) process that operates inside the dynamic namespace: it is used for requesting the TCP client socket for a specific IP flow. This entails the following steps:</p><ol><li><p>The Oxy process reserves a NAT mapping for that IP flow for downgrade.</p></li><li><p>It requests (via a <a href="https://man7.org/linux/man-pages/man2/send.2.html">pipe sendmsg</a>) the cloned child process to establish a TCP connection to the NAT-ed addresses.</p></li><li><p>By doing so, the child process inherently makes the Linux kernel TCP implementation issue a TCP handshake to the upstream, causing a SYN IP packet to show up in the TUN interface.</p></li><li><p>The Oxy process is consuming packets from the downgrading namespace’s TUN interface, and hence will consume that packet, for which it promptly reverts the NAT. The IP packet is then off-ramped as explained in the next section.</p></li><li><p>In the meantime, the child process will have sent back (via the paired pipe) the file descriptor for the TCP client socket, again using SCM_RIGHTS. The Oxy application will now proxy the client TCP connection (meant to be downgraded) into that obtained TCP connection, to result in the raw IP packets read from the TUN interface.</p></li></ol><p>Despite being elaborate, this is quite intuitive, particularly if you’ve read through the upgrade section earlier that is a simpler version of this idea.</p>
    <div>
      <h3>The overall picture</h3>
      <a href="#the-overall-picture">
        
      </a>
    </div>
    <p>In the sections above we have covered the life of an IP packet entering Oxy and what happens to it until exiting towards its upstream destination. This is summarized in the following diagram illustrating the life cycle of such packets.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1PQ1zLHMeqHLCiTaLfdDXT/e68ba49b2f7015e0e31bb173cc8ac54a/The-overall-picture.png" />
            
            </figure><p>Life cycle of IP packets in and out of an Oxy instance</p><p>We are left with how to exit the traffic. Sending the proxied traffic towards its destination (referred to as upstream) is what we call off-ramping it. We support off-ramping traffic across the same OSI Model layers that we allow to on-ramp: that is, as IP packets, TCP or UDP sockets, or HTTP(S) directly.</p><p>It is up to the application logic (that uses the Oxy framework) to make that decision and instruct Oxy on which layer to use. There is a lot to be said about this part, such as what <a href="/cloudflare-servers-dont-own-ips-anymore/">IPs to use when egressing to the Internet</a> — so if you are curious for more details, then stay tuned for more blog posts about Oxy.</p><p>No software overview is complete without its tests. The one interesting thing to think about here is that, to test all of the above, we need to generate raw IP packets in our tests. That’s not ideal as one would like to just write plain Rust logic that establishes TCP connections towards the Oxy proxy. Hence, to simplify all of this, our tests actually reuse our internal library (described above) to create a dynamic network namespaces and downgrade/upgrade the TCP connections as necessary.</p><p>Therefore, our tests talk normal TCP against a TCP downgrader running together with the tests, which outputs raw IP packets that we pipe to the Oxy instance being tested. It is an elegant and simple way to work around the challenge while battle testing further the TUN interface logic.</p>
    <div>
      <h3>Wrapping up</h3>
      <a href="#wrapping-up">
        
      </a>
    </div>
    <p>Covering proxying IP packets all the way to HTTP requests feels like an overly broad framework. We felt the same at first at Cloudflare, particularly because Oxy was not born in a day, and in fact it started first with HTTP proxying and then started to go down the OSI Model layers. In hindsight, doing it all feels the right decision: being able to upgrade and downgrade traffic as necessary has been very useful, and in fact our proxying logic shares the majority of code despite handling different layers (socket primitives, observability, security aspects, configurability, etc).</p><p>Today, all of the ideas above are powering Cloudflare One Zero Trust as well as <a href="/geoexit-improving-warp-user-experience-larger-network/">plain WARP</a>. This means they are battle-tested across millions of daily users exchanging most of their traffic (both to the Internet as well as towards private/corporate networks) through the Cloudflare global network.</p><p>If you’ve enjoyed reading this and are interested in working on similar challenges with Rust, then be sure to check our open positions as we continue to grow our team. Likewise, there will be more blog posts related to our learnings developing Oxy, so tag along the ride for more fun!</p> ]]></content:encoded>
            <category><![CDATA[Proxying]]></category>
            <category><![CDATA[Rust]]></category>
            <category><![CDATA[Oxy]]></category>
            <guid isPermaLink="false">6QDZq0bfVTtMajuHkH0UFA</guid>
            <dc:creator>Nuno Diegues</dc:creator>
        </item>
        <item>
            <title><![CDATA[Weave your own global, private, virtual Zero Trust network on Cloudflare with WARP-to-WARP]]></title>
            <link>https://blog.cloudflare.com/warp-to-warp/</link>
            <pubDate>Mon, 09 Jan 2023 14:00:00 GMT</pubDate>
            <description><![CDATA[ Today, we’re excited to announce a new way to use Cloudflare WARP to securely connect to and from any device in your Zero Trust deployment simply running WARP ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Millions of users rely on <a href="https://1.1.1.1/">Cloudflare WARP</a> to connect to the Internet through Cloudflare’s network. Individuals download the mobile or desktop application and rely on the Wireguard-based tunnel to make their browser faster and more private. Thousands of enterprises trust Cloudflare WARP to connect employees to our <a href="https://www.cloudflare.com/products/zero-trust/gateway/">Secure Web Gateway</a> and other <a href="https://www.cloudflare.com/products/zero-trust/">Zero Trust services</a> as they navigate the Internet.</p><p>We’ve heard from both groups of users that they also want to connect to other devices running WARP. Teams can build a private network on Cloudflare’s network today by connecting WARP on one side to a <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/">Cloudflare Tunnel</a>, <a href="https://developers.cloudflare.com/magic-wan/how-to/configure-tunnels/">GRE tunnels</a>, or <a href="https://developers.cloudflare.com/magic-wan/how-to/ipsec/">IPSec tunnels</a> on the other end. However, what if both devices already run WARP?</p><p>Starting today, we’re excited to make it even easier to build a network on Cloudflare with the launch of WARP-to-WARP connectivity. With a <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/connect-private-networks/">single click</a>, any device running WARP in your organization can reach any other device running WARP. Developers can connect to a teammate's machine to test a web server. Administrators can reach employee devices to troubleshoot issues. The feature works with our existing private network on-ramps, like the tunnel options listed above. All with <a href="https://developers.cloudflare.com/cloudflare-one/policies/filtering/">Zero Trust rules</a> built in.</p><p>To get started, <a href="http://cloudflare.com/lp/warp-peering">sign-up</a> to receive early access to our closed beta. If you’re interested in learning more about how it works and what else we will be launching in the future, keep scrolling.</p>
    <div>
      <h3>The bridge to Zero Trust</h3>
      <a href="#the-bridge-to-zero-trust">
        
      </a>
    </div>
    <p>We understand that adopting a <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">Zero Trust architecture</a> can feel overwhelming at times. With <a href="https://www.cloudflare.com/cloudflare-one/">Cloudflare One</a>, our mission is to make Zero Trust prescriptive and approachable regardless of where you are on your journey today. To help users navigate the uncertain, we created resources like our vendor-agnostic <a href="https://zerotrustroadmap.org/">Zero Trust Roadmap</a> which lays out a battle-tested path to Zero Trust. Within our own products and services, we’ve launched a number of features to <a href="/stronger-bridge-to-zero-trust/">bridge the gap</a> between the networks you manage today and the network you hope to build for your organization in the future.</p><p>Ultimately, our goal is to enable you to overlay your network on Cloudflare however you want, whether that be with existing hardware in the field, a carrier you already partner with, through existing technology standards like <a href="https://developers.cloudflare.com/magic-wan/how-to/ipsec/">IPsec tunnels</a>, or more Zero Trust approaches like <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/">WARP</a> or <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/">Tunnel</a>. It shouldn’t matter which method you chose to start with, the point is that you need the flexibility to get started no matter where you are in this journey. We call these connectivity options on-ramps and off-ramps.</p>
    <div>
      <h3>A recap of WARP to Tunnel</h3>
      <a href="#a-recap-of-warp-to-tunnel">
        
      </a>
    </div>
    <p>The model laid out above allows users to start by defining their specific needs and then customize their deployment by choosing from a set of fully composable on and offramps to connect their users and devices to Cloudflare. This means that customers are able to leverage <b>any</b> of these solutions together to route traffic seamlessly between devices, offices, data centers, cloud environments, and self-hosted or SaaS applications.</p><p>One example of a deployment we’ve seen thousands of customers be successful with is what we call WARP-to-Tunnel. In this deployment, the on-ramp <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/">Cloudflare WARP</a> ensures end-user traffic reaches Cloudflare’s global network in a secure and performant manner. The off-ramp <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/">Cloudflare Tunnel</a> then ensures that, after your Zero Trust rules have been enforced, we have secure, redundant, and reliable paths to land user traffic back in your distributed, private network.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/01oGLpi0gnpLOn4TNmGj4K/04c30018504b2509f9ddb3a8f1f56737/image3-5.png" />
            
            </figure><p>This is a great example of a deployment that is ideal for users that need to support public to private traffic flows (i.e. North-South)</p><p>But what happens when you need to support private to private traffic flows (i.e. East-West) within this deployment?</p>
    <div>
      <h3>With WARP-to-WARP, connecting just got easier</h3>
      <a href="#with-warp-to-warp-connecting-just-got-easier">
        
      </a>
    </div>
    <p>Starting today, devices on-ramping to Cloudflare with WARP will also be able to off-ramp to each other. With this announcement, we’re adding yet another tool to leverage in new or existing deployments that provides users with stronger network fabric to connect users, devices, and autonomous systems.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2dAe0rTL1XOrCSYXL8rl27/8061aef22e72b119cab4947538f34ba5/image1-7.png" />
            
            </figure><p>This means any of your Zero Trust-enrolled devices will be able to securely connect to any other device on your Cloudflare-defined network, regardless of physical location or network configuration. This unlocks the ability for you to address any device running WARP in the exact same way you are able to send traffic to services behind a Cloudflare Tunnel today. Naturally, all of this traffic flows through our in-line Zero Trust services, regardless of how it gets to Cloudflare, and this new connectivity announced today is no exception.</p><p>To power all of this, we now track where WARP devices are connected to, in Cloudflare’s global network, the same way we do for Cloudflare Tunnel. Traffic meant for a specific WARP device is relayed across our network, <a href="https://www.cloudflare.com/products/argo-smart-routing/">using Argo Smart Routing</a>, and piped through the <a href="/warp-technical-challenges/">transport</a> that routes IP packets to the appropriate WARP device. Since this traffic goes through our <a href="https://www.cloudflare.com/products/zero-trust/gateway/">Zero Trust Secure Web Gateway</a> — allowing various types of filtering — it means we upgrade and downgrade traffic from purely routed IP packets to fully proxied TLS connections (as well as other protocols). In the case of using SSH to remotely access a colleague’s WARP device, this means that your traffic is eligible for <a href="/ssh-command-logging/">SSH command auditing</a> as well.</p>
    <div>
      <h3>Get started today with these use cases</h3>
      <a href="#get-started-today-with-these-use-cases">
        
      </a>
    </div>
    <p>If you already deployed Cloudflare WARP to your organization, then your IT department will be excited to learn they can use this new connectivity to reach out to any device running Cloudflare WARP. Connecting via <a href="https://www.cloudflare.com/learning/access-management/what-is-ssh/">SSH</a>, RDP, SMB, or any other service running on the device is now simpler than ever. All of this provides Zero Trust access for the IT team members, with their actions being secured in-line, audited, and pushed to your organization’s logs.</p><p>Or, maybe you are done with designing a new function of an existing product and want to let your team members check it out at their own convenience. Sending them a link with your private IP — assigned by Cloudflare — will do the job. Their devices will see your machine as if they were in the same physical network, despite being across the other side of the world.</p><p>The usefulness doesn’t end with humans on both sides of the interaction: the weekend has arrived, and you have finally set out to move your local NAS to a host provider where you run a virtual machine. By running Cloudflare WARP on it, similarly to your laptop, you can now access your photos using the virtual machine’s private IP. This was already possible with <a href="https://developers.cloudflare.com/cloudflare-one/tutorials/warp-to-tunnel/">WARP to Tunnel</a>; but with WARP-to-WARP, you also get connectivity in reverse direction, where you can have the virtual machine periodically rsync/scp files from your laptop as well. This means you can make any server initiate traffic towards the rest of your Zero Trust organization with this new type of connectivity.</p>
    <div>
      <h3>What’s next?</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>This feature will be available on all plans at no additional cost. To get started with this new feature, <a href="http://cloudflare.com/lp/warp-peering">add your name to the closed beta</a>, and we’ll notify you once you’ve been enrolled. Then, you’ll simply ensure that at least two devices are enrolled in Cloudflare Zero Trust and have the latest version of Cloudflare WARP installed.</p><p>This new feature builds upon the existing benefits of Cloudflare Zero Trust, which include enhanced connectivity, improved performance, and streamlined <a href="https://www.cloudflare.com/learning/access-management/what-is-access-control/">access controls</a>. With the ability to connect to any other device in their deployment, Zero Trust users will be able to take advantage of even more robust security and connectivity options.</p><p>To get started in minutes, <a href="https://dash.cloudflare.com/sign-up/teams?lang=en-US">create a Zero Trust account</a>, download the WARP agent, enroll these devices into your Zero Trust organization, and start creating Zero Trust policies to establish fast, secure connectivity between these devices. That’s it.</p> ]]></content:encoded>
            <category><![CDATA[CIO Week]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Zero Trust]]></category>
            <category><![CDATA[Private Network]]></category>
            <category><![CDATA[WARP]]></category>
            <guid isPermaLink="false">6MvsqlqUyMNyTVA9RnKzaZ</guid>
            <dc:creator>Abe Carryl</dc:creator>
            <dc:creator>Nuno Diegues</dc:creator>
        </item>
        <item>
            <title><![CDATA[Building many private virtual networks through Cloudflare Zero Trust]]></title>
            <link>https://blog.cloudflare.com/building-many-private-virtual-networks-through-cloudflare-zero-trust/</link>
            <pubDate>Tue, 26 Apr 2022 13:01:08 GMT</pubDate>
            <description><![CDATA[ Starting today, we are thrilled to announce that you can start building many segregated virtual private networks over Cloudflare Zero Trust, beginning with virtualized connectivity for the connectors Cloudflare WARP and Cloudflare Tunnel ]]></description>
            <content:encoded><![CDATA[ <p>We built Cloudflare’s Zero Trust platform to help companies rely on our network to connect their private networks securely, while improving performance and reducing operational burden. With it, you could build a single virtual private network, where all your connected private networks had to be uniquely identifiable.</p><p>Starting today, we are thrilled to announce that you can start building many segregated virtual private networks over Cloudflare Zero Trust, beginning with virtualized connectivity for the connectors Cloudflare WARP and Cloudflare Tunnel.</p>
    <div>
      <h3>Connecting your private networks through Cloudflare</h3>
      <a href="#connecting-your-private-networks-through-cloudflare">
        
      </a>
    </div>
    <p>Consider your team, with various services hosted across distinct private networks, and employees accessing those resources. More than ever, those employees may be roaming, remote, or actually in a company office. Regardless, you need to ensure only they can access your private services. Even then, you want to have granular control over what each user can access within your network.</p><p>This is where Cloudflare can help you. We make our <a href="/private-networking/">global, performant network</a> available to you, acting as a virtual bridge between your employees and private services. With your employees’ devices running <a href="/warp-for-desktop/">Cloudflare WARP</a>, their traffic egresses through Cloudflare’s network. On the other side, your private services are behind <a href="/highly-available-and-highly-scalable-cloudflare-tunnels/">Cloudflare Tunnel</a>, accessible only through Cloudflare’s network. Together, these connectors protect your virtual private network end to end.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1vkHuzVWGNrTZdH3vU2S3P/c35fc8dae6e3d169ac4217b931bb64d0/942-1.png" />
            
            </figure><p>The beauty of this setup is that your traffic is immediately faster <b>and</b> more secure. But you can then take it a step further and extract value from many Cloudflare services for your <a href="/private-networking/">private network routed traffic</a>: auditing, fine-grained filtering, data loss protection, malware detection, safe browsing, and many others.</p><p>Our customers are already in love with our Zero Trust private network routing solution. However, like all things we love, they can still improve.</p>
    <div>
      <h3>The problem of overlapping networks</h3>
      <a href="#the-problem-of-overlapping-networks">
        
      </a>
    </div>
    <p>In the image above, the user can access any private service as if they were physically located within the network of that private service. For example, this means typing <i>jira.intra</i> in the browser or SSH-ing to a private IP <code><i>10.1.2.3</i></code> will work seamlessly despite neither of those private services being exposed to the Internet.</p><p>However, this has a big assumption in place: those underlying private IPs are assumed to be unique in the private networks connected to Cloudflare in the customer’s account.</p><p>Suppose now that your Team has two (or more) data centers that use the same IP space — usually referred to as a <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">CIDR</a> — such as <code>10.1.0.0/16</code>. Maybe one is the current primary and the other is the secondary, replicating one another. In such an example situation, there would exist a machine in each of those two data centers, both with the same IP, <code><i>10.1.2.3</i></code>.</p><p>Until today, you could not set up that via Cloudflare. You would connect data center 1 with a Cloudflare Tunnel responsible for traffic to <code>10.1.0.0/16</code>. You would then do the same in data center 2, but receive an error forbidding you to create an ambiguous IP route:</p>
            <pre><code>$ cloudflared tunnel route ip add 10.1.0.0/16 dc-2-tunnel

API error: Failed to add route: code: 1014, reason: You already have a route defined for this exact IP subnet</code></pre>
            <p>In an ideal world, a team would not have this problem: every private network would have unique IP space. But that is just not feasible in practice, particularly for large enterprises. Consider the case where two companies merge: it is borderline impossible to expect them to rearrange their private networks to preserve IP addressing uniqueness.</p>
    <div>
      <h3>Getting started on your new virtual networks</h3>
      <a href="#getting-started-on-your-new-virtual-networks">
        
      </a>
    </div>
    <p>You can now overcome the problem above by creating unique virtual networks that logically segregate your overlapping IP routes. You can think of a virtual network as a group of IP subspaces. This effectively allows you to compose your overall infrastructure into independent (virtualized) private networks that are reachable by your Cloudflare Zero Trust organization through Cloudflare WARP.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2dflIKfIQ1Uk1IljXnMLPO/ba7d2a72e39f23b194215a6586d1215e/942-2.png" />
            
            </figure><p>Let us set up this scenario.</p><p>We start by creating two virtual networks, with one being the default:</p>
            <pre><code>$ cloudflared tunnel vnet add —-default vnet-frankfurt "For London and Munich employees primarily"

Successfully added virtual network vnet-frankfurt with ID: 8a6ea860-cd41-45eb-b057-bb6e88a71692 (as the new default for this account)

$ cloudflared tunnel vnet add vnet-sydney "For APAC employees primarily"

Successfully added virtual network vnet-sydney with ID: e436a40f-46c4-496e-80a2-b8c9401feac7</code></pre>
            <p>We can then create the Tunnels and route the CIDRs to them:</p>
            <pre><code>$ cloudflared tunnel create tunnel-fra

Created tunnel tunnel-fra with id 79c5ba59-ce90-4e91-8c16-047e07751b42

$ cloudflared tunnel create tunnel-syd

Created tunnel tunnel-syd with id 150ef29f-2fb0-43f8-b56f-de0baa7ab9d8

$ cloudflared tunnel route ip add --vnet vnet-frankfurt 10.1.0.0/16 tunnel-fra

Successfully added route for 10.1.0.0/16 over tunnel 79c5ba59-ce90-4e91-8c16-047e07751b42

$ cloudflared tunnel route ip add --vnet vnet-sydney 10.1.0.0/16 tunnel-syd

Successfully added route for 10.1.0.0/16 over tunnel 150ef29f-2fb0-43f8-b56f-de0baa7ab9d8</code></pre>
            <p>And that’s it! Both your Tunnels can now be run and they will connect your private data centers to Cloudflare despite having overlapping IPs.</p><p>Your users will now be routed through the virtual network <i>vnet-frankfurt</i> by default. Should any user want otherwise, they could choose on the WARP client interface settings, for example, to be routed via <i>vnet-sydney</i>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4lVVgO1sz8FjM4JkqSrjwq/9af5727f859ad8448d54b6f267bd6f31/942-3.png" />
            
            </figure><p>When the user changes the virtual network chosen, that informs Cloudflare’s network of the routing decision. This will propagate that knowledge to all our data centers via <a href="/introducing-quicksilver-configuration-distribution-at-internet-scale/">Quicksilver</a> in a matter of seconds. The WARP client then restarts its connectivity to our network, breaking existing TCP connections that were being routed to the previously selected virtual network. This may be perceived as if you were disconnecting and reconnecting the WARP client.</p><p>Every current Cloudflare Zero Trust organization using private network routing will now have a default virtual network encompassing the IP Routes to Cloudflare Tunnels. You can start using the commands above to expand your private network to have overlapping IPs and reassign a default virtual network if desired.</p><p>If you do not have overlapping IPs in your private infrastructure, no action will be required.</p>
    <div>
      <h2>What’s next</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>This is just the beginning of our support for distinct virtual networks at Cloudflare. As you may have seen, last week we announced the ability to create, deploy, and manage Cloudflare Tunnels directly from the Zero Trust dashboard. Today, virtual networks are only supported through the cloudflared CLI, but we are looking to integrate virtual network management into the dashboard as well.</p><p>Our next step will be to make Cloudflare Gateway aware of these virtual networks so that <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">Zero Trust policies</a> can be applied to these overlapping IP ranges. Once Gateway is aware of these virtual networks, we will also surface this concept with Network Logging for auditability and troubleshooting moving forward.</p> ]]></content:encoded>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Zero Trust]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[WARP]]></category>
            <category><![CDATA[Private Network]]></category>
            <category><![CDATA[Cloudflare Zero Trust]]></category>
            <guid isPermaLink="false">738frviEhiXQBr5LFtF0nW</guid>
            <dc:creator>Nuno Diegues</dc:creator>
            <dc:creator>Sudarsan Reddy</dc:creator>
        </item>
    </channel>
</rss>