How do I connect a database behind a bastion host to iDBQuery?
Give iDBQuery access to the bastion (jump) host and it will hop through it to reach the private database. iDBQuery opens an SSH connection to the bastion in your public subnet, then forwards to the database in the private subnet, so the database is never exposed.
A common secure architecture puts your database in a private subnet with no public route, reachable only through a bastion host (also called a jump box) in a public subnet. iDBQuery works with exactly this pattern.
You provide:
- The bastion's address and SSH credentials (usually an SSH key).
- The database host and port as seen from inside the private subnet.
iDBQuery connects to the bastion over SSH, forwards the connection to the private database, and runs your queries through that encrypted hop. The database keeps rejecting all direct public traffic — only the bastion can reach it, and only iDBQuery's forwarded, read-only session passes through.
Why teams like this:
- The database stays private — no public endpoint, ever.
- Least privilege — pair the hop with a dedicated read-only database user.
- Auditability — access flows through your controlled bastion, alongside your other logging.
For the tightest setups, you can instead deploy iDBQuery inside the same VPC so it's already on the private side and doesn't need the jump at all.
Example: a fintech runs its ledger in a private subnet behind a bastion. They add iDBQuery's key to the bastion, connect to a read replica, and finance can ask cited questions of production-grade data without anyone opening the database or exporting a copy.
Updated 2026-06-22
Related questions
- Can I connect a database to iDBQuery over an SSH tunnel?
- Can I connect a database to iDBQuery over a VPN or private link?
- How do I connect an on-prem database behind a firewall to iDBQuery?
- Can I give iDBQuery a read-only database user?
- How do I connect a Postgres read replica to iDBQuery without exposing it publicly?