Question
Can I use Cloudflare Tunnel with CNAMEs to expose a database server?
Asked by: USER1714
68 Viewed
68 Answers
Answer (68)
Yes, you can use Cloudflare Tunnel with CNAMEs to expose a database server, but with caution. It's generally recommended to avoid exposing database servers directly to the internet. Instead, you should create a secure API layer in front of the database and expose that API layer through the Cloudflare Tunnel. This adds an extra layer of security and allows you to control access to your database. You'll point the CNAME to the Tunnel, and the Tunnel will route traffic to your API, which then communicates with the database.