© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•2y ago•
35 replies
AaronGong

Zero trust tunnel cannot access the database

I am using tunnel to expose local services.

I started a fastapi service locally and used tunnel to expose the service, and everything went well.

As you can see from the picture, you can access the service smoothly whether you use localhost or domain name.(pic1,pic2,pic3)

Then, I wanted to access the postgres database through the tunnel as well, and I set it up (pic4)

However, at this time, if you use the domain name to connect to the database, it will fail, but using localhost will succeed.(pic5,pic6)

I don't know why this is happening. Maybe you would think that this might be caused by the database configuration, but I changed it and it didn't work.

Moreover, when I used another intranet penetration tool (natapp) to connect to the database via the domain name, it was successful.(pic7,pic8)
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Cloudflare tunnel zero trust access application
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
zero trust tunnel broke
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
Zero Trust Domain Tunnel
Cloudflare DevelopersCDCloudflare Developers / general-help
6mo ago
Zero Trust Access
Cloudflare DevelopersCDCloudflare Developers / general-help
3y ago