Introduction

Cloudflare Tunnel is a free and secure way to expose your server to the internet without exposing your server’s IP address. It uses tunnelling to connect your server to the Cloudflare network, which receives all requests and can provide end-to-end encryption. It is useful for Self-Hosting applications, databases, and services on your own hardware, such as a personal computer, server, or even a Raspberry Pi. Official Documentation

Info

It requires a registered domain, such as “igormauricio.com” and a Cloudflare account to work.

Why Cloudflare Tunnel?

Security

Cloudflare Tunnel ensures that your server is secure by connecting it to the Cloudflare network. It encrypts the traffic between your server and the Cloudflare network, ensuring that your data is secure.

Privacy

Cloudflare Tunnel allows you to expose your server to the internet without exposing your server’s IP address. This ensures that your server’s IP address is not exposed to the public, protecting your privacy.

Free

Cloudflare Tunnel is free to use, but it requires a Cloudflare account. Cloudflare offers a free tier that includes basic features such as DDoS protection, SSL/TLS encryption, and a content delivery network (CDN).

Installation

Access the Cloudflare’s Dashboard, create an account and follow the instructions to install the Cloudflare Tunnel on your machine.

Install Client

Ubuntu
# Requirements
sudo apt-get install -y curl 
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
 
# Install Cloudflare Tunnel
sudo dpkg -i cloudflared.deb

SSH Via Cloudflare Tunnel

https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/#connect-to-ssh-server-with-cloudflared-access