Cloudflare Tunnel¶
Protect your web servers from direct attack¶
From the moment an application is deployed, developers and IT spend time locking it down — configuring ACLs, rotating IP addresses, and using clunky solutions like GRE tunnels.
There’s a simpler and more secure way to protect your applications and web servers from direct attacks: Cloudflare Tunnel.
Ensure your server is safe, no matter where it’s running: public cloud, private cloud, Kubernetes cluster, or even a Mac mini under your TV.
I do everthing in the cli¶
install the cloudflare tunnel service. in my case i will do the install on een ubuntu machine.
When you run the flowing command you get a url. login to cloudflare
Tip
When cloudflare is connected you get a cert.pem. Make a note of the location.
create the tunnel by name fill the name that you want for the tunnel.
Tip
Take a note where your tunnel credentials are saved.
create a configuration file in the .cloudflared
directory
Set the following lines.
add your first site example.com
create the ingress. create config.yml file in you .cloudflared directory
start the tunnel
Make a service to run automatic
start en enable the service