blog
  • Blogs
    • Medium Articles
      • Linux
        • 40 Powerful Linux Networking Commands You Must Know.
        • These (Linux) VI Editor Shortcuts You Must Know
        • Bash/Linux Interview Questions for DevOps Engineers
        • Page 1
      • Git
        • 40 Powerful Git Commands Every Developer Should Know
        • 10 Git Best Practices That Every Developer Must Know
      • DevOps/SRE Interview Questions and Answers
        • Top DevOps/SRE Interview Questions and Answers on AWS VPC
        • Top 10 Common DevOps/SRE Interview Questions and Answers on Terraform Best Practices
        • Top 10 Common DevOps/SRE Interview Questions and Answers on Kubernetes Best Practices
        • Top 10 Common DevOps/SRE Interview Questions and Answers on Dockerfiles
        • Top 10 Common DevOps/SRE Interview Questions and Answers on Grafana
      • Installation
        • Docker Installation on Ubuntu 20/22
        • Install WireGuard VPN on Docker Compose
        • Install Redis on Docker Compose
        • Gravitee Docker Compose
      • Kubernetes Series 2025
        • Understanding Kubernetes: Part 1 -Control Plane
        • Understanding Kubernetes: Part 2 -Worker Node
        • Understanding Kubernetes: Part 3 -Pod
        • Understanding Kubernetes: Part 4-ReplicaSets
        • Understanding Kubernetes: Part 5 -Deployment
        • Understanding Kubernetes: Part 6 -DaemonSets
        • Understanding Kubernetes: Part 7 -StatefulSet
        • Understanding Kubernetes: Part 8 -ConfigMap
        • Understanding Kubernetes: Part 9 -Kubernetes Secret
        • Understanding Kubernetes: Part 10 -StorageClass
        • Understanding Kubernetes: Part 11 -Persistent Volume (PV)
        • Understanding Kubernetes: Part 12 -Persistent Volume Claim (PVC)
        • Understanding Kubernetes: Part 13 -Services
        • Understanding Kubernetes: Part 14 -ClusterIP Service
        • Understanding Kubernetes: Part 15 -NodePort Service
        • Understanding Kubernetes: Part 16 -Load Balancer Service
        • Understanding Kubernetes: Part 17 -Ingress
        • Understanding Kubernetes: Part 18 -Ingress Controller
        • Understanding Kubernetes: Part 19 -Headless Service
        • Understanding Kubernetes: Part 20-Network Policy
        • Understanding Kubernetes: Part 21 -CNI
        • Understanding Kubernetes: Part 22 Kubernetes Resource Requests & Limits
        • Understanding Kubernetes: Part 23 Node Selector
        • Understanding Kubernetes: Part 24 Taints and Tolerations
        • Understanding Kubernetes: Part 25 Affinity and Anti-Affinity
        • Understanding Kubernetes: Part 26 Preemption and Priority
        • Understanding Kubernetes: Part 27 Role and RoleBinding
        • Understanding Kubernetes: Part 28 ClusterRole and ClusterRoleBinding
        • Understanding Kubernetes: Part 29 Service Account
        • Understanding Kubernetes: Part 30 Horizontal Pod Autoscaler (HPA)
        • Understanding Kubernetes: Part 31 Vertical Pod Autoscaler (VPA)
        • Understanding Kubernetes: Part 33 Startup Probe
        • Understanding Kubernetes: Part 34 Liveness Probe
        • Understanding Kubernetes: Part 35 Readiness Probe
        • Understanding Kubernetes: Part 36 Container Network Interface (CNI)
        • Understanding Kubernetes: Part 37 Container Runtime Interface (CRI)
        • Understanding Kubernetes: Part 38 Container Storage Interface (CSI)
      • Cloudflare
        • Cloudflare Tunnel for Secure HTTP Routing
      • Nginx
        • Nginx use cases that every engineer must know
Powered by GitBook
On this page
  • Introduction
  • What is Cloudflare Tunnel?
  • Benefits of Cloudflare Tunnel:
  • Setting Up Cloudflare Tunnel for HTTP Routing
  • Install and run connectors
  • Great! We are done!
  • Conclusion
  1. Blogs
  2. Medium Articles
  3. Cloudflare

Cloudflare Tunnel for Secure HTTP Routing

PreviousCloudflareNextNginx

Last updated 2 months ago

Cloudflare tunnel setup

Introduction

In today’s cloud-driven world, securely exposing internal services to the internet without worrying about network configuration complexities is crucial. Cloudflare Tunnel provides a secure way to route HTTP traffic from your origin servers to the internet without opening ports or configuring firewalls manually. This article explores how Cloudflare Tunnel works and how you can set it up for secure HTTP routing.

What is Cloudflare Tunnel?

Cloudflare Tunnel, previously known as Argo Tunnel, acts as a secure gateway between your server and Cloudflare’s network. It allows you to expose web applications without making your origin server publicly accessible. Instead of exposing your infrastructure to the internet, Cloudflare Tunnel securely routes requests through Cloudflare’s global network, ensuring protection against DDoS attacks and unauthorized access.

Benefits of Cloudflare Tunnel:

  • No Open Ports: Eliminates the need for exposing ports to the internet.

  • Automatic HTTPS: Cloudflare provides SSL encryption by default.

  • DDoS Protection: Cloudflare’s security stack protects against attacks.

  • Access Control: Integrates with Cloudflare Access for authentication.

  • Reduces Latency: Routes traffic through Cloudflare’s global network for faster access.

Setting Up Cloudflare Tunnel for HTTP Routing

Follow these steps to set up Cloudflare Tunnel and securely route HTTP traffic to your internal services.

Navigate to Networks > Tunnels

Click on Create a tunnel

Select Cloudflared connector

Name your tunnel

Install and run connectors

Choose an Operating system

Choose Architecture

Login to the server where you want to install the tunnel

Run a command given by Cloudflare

After complete installation, we can see our server connected to the tunnel

Add networks CIDR block (AWS VPC’s CIDR) (Optional)

Add Domain to route and local Service

Now, check whether the domain is routed to the service or not.

Great! We are done!

Conclusion

Cloudflare Tunnel simplifies HTTP routing by securely exposing services without compromising security. With features like automatic HTTPS, DDoS protection, and access control, it’s a powerful solution for securing web applications. By following these steps, you can set up Cloudflare Tunnel and ensure a safe and efficient deployment of your web services.

Login to Cloudflare zero trust dashboard

Create cloudflare tunnel
Cloudflared
Cloudflared connector
Install cloudflared tunnel
Cloudflare One
Create cloudflare Tunnel