VPN Connection with On-Premise Hosting

I am currently trying to host Retool on an Amazon Lightsail server and connect it through a vpn to my database, but am having trouble configuring it to do so. Anyone have experience doing this sort of thing?

Edit 1: The error I receive upon hitting the "Test Connection" button in the Retool "Add Resource" Screen is as follows

Test connection failed.

getaddrinfo ENOTFOUND [server hostname]

The hostname you provided doesn't work. Perhaps there's a typo, or it's not a public hostname? (e.g. behind a VPC)

Edit 2:
When hosted locally on my computer that was connected to the VPN as opposed to the LightSail server, I was able to query my database.

After using openconnect to connect to my VPN on the LightSail server, I was able to ping the Postgres server by running

ping retool.fakeDBdomain.com

Looks like either a dns or routing problem. But difficult to tell as this is not a lot of information. Retool is not able to resolve the fqdn.

This is what I thought too. The VPN is running on Host, but Docker containers run on Bridge networks, and I think they are unable to see the VPN on host (although I thought the directory mapping built into Docker would handle this.)

The problem was solved by using the server's IP address instead of its hostname for the 'Hostname' field when configuring the server to be used via Retool's GUI, which allowed it to connect to our database and query it successfully.

(Note: The underlying cause here is probably a DNS issue, not a Retool issue)