Twingate and LightBeam Integration Guide


Overview

The guide provides step-by-step instructions for deploying Twingate and integrating it with LightBeam. It will give insights into Twingate's core components, including the Twingate Client, Twingate Cloud, and Twingate Connectors, as well as the Twingate Admin Console for centralized management. Additionally, the guide covers onboarding RDS to LightBeam on both EKS and EC2 instances, along with troubleshooting tips for resolving potential issues. By following this guide, IT administrators can establish a robust and secure network, ensuring authorized access and privacy protection.


Twingate Components

  1. Twingate Client: The Twingate client is a lightweight application that runs on your local device and provides secure access to your organization's resources. The client communicates with the Twingate cloud to authenticate users and authorize access to specific resources.

  2. Twingate Cloud: The Twingate cloud is the central hub of the Twingate platform, managing access policies, user authentication, and traffic routing. It is a global network of high-performance edge nodes that route traffic between the Twingate client and your organization's resources.

  3. Twingate Connectors: The Twingate connector is a lightweight Docker container that runs in your organization's infrastructure and provides secure access to on-premises and cloud-based resources. The connector connects to the Twingate cloud to authenticate users and route traffic between the Twingate client and your organization's resources.

  4. Twingate Admin Console: The Twingate Admin Console is a web-based interface that allows administrators to manage and configure the Twingate platform. It provides a central location for configuring access policies, managing users and groups, and monitoring network activity.


Assumption:

  1. RDS is not in the same VPC as EKS/EC2 node.

  2. An ec2 VM is needed in the same VPC as RDS to deploy the Twingate Connector docker image.

Fig. 1 Twingate client setup on Ubuntu LightBeam jumpbox


Supported distributions

The Twingate Linux Client currently supports the following Linux distributions for x86/AMD64 and ARM64-based devices:

  • Ubuntu (18.04 LTS or later)

System Prerequisites

  • The Linux Client requires either systemd-resolved service to be enabled/running or NetworkManager service to be configured and enabled/running as the client DNS service.

  • A notification service is required for interactive user authentication. If a notification service is not available, the Client will provide instructions for receiving a console-based notification feed.


Installation and Setup

Installation of Twingate client on Jumpbox :

The following command will download and install the Twingate Client.

curl -s https://binaries.twingate.com/client/linux/install.sh | sudo bash

Usage notes

Command
Description

sudo twingate setup

Interactively configure the Twingate Client.

twingate start

Start the Twingate Client.

twingate status

Output Twingate Client status.

twingate stop

Stop the Twingate Client.

twingate help

Show usage information.

twingate resources

Show available Resources for the authenticated user.


Steps to Start and Configure Twingate Client

Step 1: Start the Twingate Service

Before starting the Twingate service, ensure you have completed the setup process for configuring access to your Twingate network.

Step 2: Configure Twingate Client

Use the twingate setup command to configure the Twingate Client interactively. Provide the required details, such as your Twingate network name (e.g., "acme" for "acme.twingate.com") and preferences for automatic startup, automatic login after restart, and error report sharing.

Step 3: Check Twingate Client Status

Use the twingate status command to check the current status of the Twingate Client. The output will indicate that the client is authenticating, and you will receive a URL to authenticate to your Twingate network.

By following these steps, you can successfully start and configure the Twingate Client, allowing secure access to your organization's resources through the Twingate network.

Script to download and configure Envoy Proxy on LightBeam Jumpbox

This script automates downloading and configuring Envoy Proxy on the LightBeam Jumpbox. It first fetches the Envoy Proxy binary from the official repository, sets appropriate permissions, and then prompts the user to input the address of the target (e.g., RDS endpoint). The script generates a envoy-postgres.yaml configuration file with the provided address, which specifies the listener and cluster settings for the TCP proxy. A systemd service unit file is created to manage the Envoy Proxy service, enabling automatic startup at boot and continuous operation. The script also provides instructions to stop the Envoy Proxy service if needed.


Onboarding RDS to LightBeam on EKS

  1. Install and authenticate the Twingate client on the jumpbox, and ensure Twingate status is online.

  2. Add the Postgres datasource to LightBeam. Specify the public IP address of the jumpbox as the host for the Postgres database.

Fig.2 PostgreSQL Configuration

Onboarding RDS to LightBeam on EC2

  1. Perform Twingate client setup and configure the client.

  2. After the Twingate client is online, find the IP assigned to RDS by Twingate running nslookup on the RDS endpoint.

  3. Go To LightBeam UI -> Datasources -> Add a Datasource Postgres

  4. Update the instance details and use the RDS nslookup IP address as the host and run Test Connection.

Note:

The IP address assigned to RDS by Twingate is dynamic and changes when the Twingate session is re-established. To ensure stable connectivity, it is not recommended to onboard the datasource with the dynamic IP address. Instead, consider using a static IP address or a domain name for the RDS instance. Always verify the address before adding it as a datasource in LightBeam.

Fig.3 Authentication Mechanism

Troubleshooting

  • Known Issue: After restarting the Twingate client, the session may not be automatically established, and the user might need to re-establish the session with Twingate status.

  • Default Authentication Requirement: Twingate requires user authentication at least once every 30 days.

Useful Commands:

  • Twingate Logs: To view Twingate logs, use the following command: sudo journalctl -u twingate -f

  • Envoy Service Status: Check the status of the Envoy Proxy service with: systemctl status envoy-proxy

  • Enable Debug Logging: To enable debug logging for Twingate, run: sudo twingate config log-level debug

If you encounter any issues or have trouble with the Twingate client or the Envoy Proxy integration, refer to the logs and enable debug logging if necessary to gain insights into the underlying processes and aid in troubleshooting.


About LightBeam

LightBeam automates Privacy, Security, and AI Governance, so businesses can accelerate their growth in new markets. Leveraging generative AI, LightBeam has rapidly gained customers’ trust by pioneering a unique privacy-centric and automation-first approach to security. Unlike siloed solutions, LightBeam ties together sensitive data cataloging, control, and compliance across structured and unstructured data applications providing 360-visibility, redaction, self-service DSRs, and automated ROPA reporting ensuring ultimate protection against ransomware and accidental exposures while meeting data privacy obligations efficiently. LightBeam is on a mission to create a secure privacy-first world helping customers automate compliance against a patchwork of existing and emerging regulations.

For any questions or suggestions, please get in touch with us at: [email protected].

Last updated