Cheat sheet for inlets-pro, the cloud native TCP tunnel
inletsctl create provider digitalocean \
--access-token-file ~/do-access \
--remote-tcp localhost
- Run the PostgeSQL instance
head -c 16 /dev/urandom |shasum
8cb3efe58df984d3ab89bcf4566b31b49b2b79b9
export PASSWORD="8cb3efe58df984d3ab89bcf4566b31b49b2b79b9"
docker run --rm --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=8cb3efe58df984d3ab89bcf4566b31b49b2b79b9 -ti postgres:latest
Then run your client
export TCP_PORTS="5432"
export LICENSE=$(cat inlets.jwt)
export TOKEN="KXJ5Iq1Z5Cc8GjFXdXJrqNhUzoScXnZXOSRKeh8x3f6tdGq1ijdENWQ2IfzdCg4U"
export EXIT_IP="134.209.21.155"
inlets-pro client --connect "wss://$EXIT_IP:8123/connect" \
--token "$TOKEN" \
--license "$LICENSE" \
--tcp-ports $TCP_PORTS
export PASSWORD="8cb3efe58df984d3ab89bcf4566b31b49b2b79b9"
export EXIT_IP="209.97.141.140"
docker run -it -e PGPORT=5432 -e PGPASSWORD=$PASSWORD --rm postgres:latest psql -U postgres -h $EXIT_IP
If you would like to keep the database service and port private, you can run the exit-server as a Pod in a Kubernetes cluster, or add an iptables rule to block access from external IPs.