Database Access | Twingate

Database Access

Securely access your private and protected databases with Twingate.

These guides cover configuring Twingate for secure access to your databases, whether they are hosted in the cloud or on-premises. With Twingate, only authorized users and services can connect to your databases, and setup requires minimal configuration.

General Setup for Database Access

If you haven’t already defined a Remote Network or deployed a Connector, start there first. The Remote Network represents the private network where your databases live, and the Connector handles outbound-only connections between authorized users and those Resources.

Private Access or Self-hosted Database:

When your database runs in the same private network or VPC as your Twingate Connector, avoid exposing any public IP addresses. Instead, allow access from the Connector’s private IP address:

Public Access or SaaS Database:

Some managed database services (e.g. MongoDB Atlas, AWS RDS/Aurora public endpoints, Azure SQL Database, Cloud SQL, Redis Cloud, Snowflake) can only be reached via the public internet. In these situations you’ll use the Connector’s public egress IP address, because the service can’t see your private network. Where providers support private connectivity (e.g. AWS VPC endpoints or PrivateLink), use the private IP address instead.

Database Services

These guides walk you through securing connections to specific database services. For other databases, follow the general (Public or Private) steps above to create a Twingate Resource and add the Connector’s IP address to your database’s allow list.

AWS Database Access Guide

Follow the steps in the AWS Database Access Guide to secure your AWS database connections using Twingate, including how to configure security groups and test your connection.

GCP Database Access Guide

Follow the steps in the GCP Database Access Guide to secure your GCP database connections using Twingate, including how to configure authorized networks or use the Cloud SQL Auth Proxy.

Azure Database Access Guide

Follow the steps in the Azure Database Access Guide to secure your Azure database connections using Twingate, including how to configure firewall rules and test your connection.

Oracle Database Access Guide

Follow the steps in the Oracle Database Access Guide to use Twingate for secure Oracle Database connections. You’ll see how to allow the Connector’s IP address in firewall or sqlnet.ora configuration, restrict access to specific listeners, and test connectivity with SQL Plus or SQL Developer.

MongoDB Access Guide

Follow the steps in the MongoDB Access Guide to configure Twingate for secure access to MongoDB & MongoDB Atlas, including how to set up IP Access Lists, connect using mongosh, and troubleshoot common issues.

Redis Access Guide

Follow the steps in the Redis Access Guide to securely connect to Redis instances, whether self-hosted or managed on Redis Cloud using Twingate. You’ll learn how to allow the Connector’s IP address in Redis’ configuration or firewall, set up authentication, and verify access with the redis-cli.

Snowflake Access Guide

Follow the steps in the Snowflake Access Guide to configure Twingate for secure access to Snowflake. The guide covers creating network rules and policies that include your Connector’s public IP address, configuring access for specific roles, and verifying connectivity via the Snowflake web UI or CLI.

Client Access Examples

If you prefer using a graphical interface for querying and managing your databases, you can connect to your database using a client like DBeaver or Microsoft SQL Server Management Studio (SSMS).

Using DBeaver for Database Access

DBeaver

DBeaver is a flexible, open-source database management tool that supports various databases (e.g. MySQL, PostgreSQL, MongoDB). Here’s how to connect to your database using DBeaver:

Using Microsoft SQL Server Management Studio (SSMS) for SQL Server Databases

SQL Server Management Studio

SSMS is commonly used for managing Microsoft SQL Server instances. Here’s how to connect using SSMS:

Troubleshooting Database Connections

If you’re having trouble connecting to your database via Twingate, check the following common issues:

For more troubleshooting tips, refer to the Twingate Troubleshooting Guide.

Further Help

As a general rule, use Connector private IP addresses whenever possible to keep traffic inside your private network. Switch to public IP addresses only when the database service requires it (e.g. SaaS-hosted databases without private connectivity options).

If you run into something not covered here, the Twingate community on Reddit is a good place to ask.