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
Was this page helpful?