Run Database through Zero Trust Tunnels
Hey,
I was wondering how I can run a database through Cloudflare Zero Trust Tunnels 😅
I've tried setting up to go to a TCP connection internally,
db.example.com
-> tcp://10.10.10.11:3306
, but its not working..
It works if I try setting it up to go to https://10.10.10.11:443
for example, but not if I go to a TCP port like MariaDB.
I get a weird socketopt error inside Datagrip, and just a "can't connect" in HeidiSQL.
Anyone have any ideas?2 Replies
?tunnel-tcp
Cloudflare Tunnels use Cloudflare's proxy, which only supports proxying HTTP Traffic. If you want to use non-http applications over your tunnel, Cloudflare has a few other options:
For a few specific protocols such as SSH, RDP, and SMB, Cloudflare has guides for them here:
https://developers.cloudflare.com/cloudflare-one/applications/non-http/
For Arbitrary TCP like Minecraft, MySQL, and any other tcp application, Cloudflare has a guide here: https://developers.cloudflare.com/cloudflare-one/applications/non-http/arbitrary-tcp/
For Arbitrary UDP like Minecraft Bedrock, SMTP, and any other udp application, you will need to use Private Networking with WARP: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/connect-private-networks/
Please note for all of these except SSH and VNC which can be browser-rendered, you will either need to use cloudflared (Cloudflare's tunnel daemon) on the client machine running in the background or Private Networking with WARP, and have WARP installed on the client machine logged into your Zero Trust Team.