I’m running into a problem exposing a PostgreSQL database through a Cloudflare Tunnel, and I’m hoping someone with deeper Cloudflare Zero Trust/WARP experience can help me understand what’s going on.
Setup:
I have a Cloudflare Tunnel running on my server, and all HTTP services behind it work without any issues.
I created a data.mydomain.com hostname in the tunnel and mapped it to a TCP service pointing at the database.
DNS is a clean CNAME to the tunnel, and Cloudflare Access is enabled.
WARP is enabled on my local machine and enrolled in my Zero Trust organization.
I can resolve and reach other services (including Grafana) through the tunnel without any problems.
The issue:
Whenever I try to connect to my database through the tunnel hostname, PostgreSQL clients fail instantly with the usual “is the server running on that host and accepting TCP/IP connections?” message.