Akses Self-Hosted Database Cloudflare Tunnel di Local
/ 1 min read
Referensi
- Expose mongodb using cloudflare zero trust tunnels and connect via pymongo
- Using Cloudflare Tunnel and Access with Postgres
Prasyarat
- setup koneksi db (tcp) pada Cloudflare Zero Trust (Tunnel).
- install Cloudflared di local
Tutorial
- Koneksikan db yang di hosting di Cloudfare Tunnel dengan local port yang tersedia.
# cloudflared access tcp \ # --hostname <hostname you've set on Cloudflare ZT> \ # --url <url you want to be forwarded to> oxw@oxw:~$ cloudflared access tcp \ --hostname db-pg.example.com \ --url 127.0.0.1:5432
- Coba akses database di local menggunakan database tool (contoh: DBeaver) dengan host/port 127.0.0.1:5432.
- Selesai.