diff --git a/docs/cloud/connect/vpn/gcp.md b/docs/cloud/connect/vpn/gcp.md new file mode 100644 index 0000000..6a31a2c --- /dev/null +++ b/docs/cloud/connect/vpn/gcp.md @@ -0,0 +1,90 @@ +--- +title: Google Cloud VPN +description: Connect to your private Dragonfly Cloud instance using Google Cloud VPN +sidebar_position: 2 +slug: /cloud/connect/vpn/gcp +--- + +# Google Cloud VPN + +This guide shows how to connect to your private Dragonfly Cloud instance using Google Cloud VPN. + +## Prerequisites + +- A Google Cloud account with appropriate permissions +- A Dragonfly Cloud instance deployed in Google Cloud with a private endpoint +- [Google Cloud SDK](https://cloud.google.com/sdk/docs/install) installed on your machine +- OpenVPN client software installed on your local machine + +## Setting Up Cloud VPN + +### Step 1: Create a VPN Gateway + +1. Navigate to the [VPN page](https://console.cloud.google.com/networking/vpn/list) in the Google Cloud Console +2. Click on "Create VPN Connection" and select "HA VPN" +3. Enter a name for your VPN gateway +4. Select the same region as your Dragonfly Cloud instance +5. Click "Create" + +### Step 2: Create a Cloud Router + +1. Click "Create Cloud Router" +2. Enter a name for your router +3. Select the same region as your VPN gateway +4. Choose a Google ASN (Autonomous System Number) +5. Click "Create" + +### Step 3: Create External VPN Gateway + +1. Navigate to "External VPN gateways" in the left menu +2. Click "Create external VPN gateway" +3. Enter a name and the appropriate interface IP addresses +4. Click "Create" + +### Step 4: Create VPN Tunnels + +1. Return to the HA VPN gateways page +2. Click on your newly created gateway +3. Click "Create VPN tunnel" +4. Configure the tunnel settings to match your network requirements +5. Create a second tunnel for high availability +6. Configure BGP sessions for each tunnel + +### Step 5: Configure Client VPN + +1. Download the OpenVPN configuration file from the Google Cloud Console +2. Import the configuration into your OpenVPN client +3. Connect to your VPN using your credentials + +## Connecting to Dragonfly Cloud + +Once your VPN connection is established: + +1. Use your standard Dragonfly client with the private endpoint address +2. Your connection is now securely tunneled through the VPN + +```python +import dragonfly + +# Connect to your private Dragonfly Cloud instance through VPN +client = dragonfly.connect( + host='your-private-endpoint.internal', + port=6379 +) + +# Now you can interact with your Dragonfly instance +client.set('key', 'value') +result = client.get('key') +print(result) # Outputs: 'value' +``` + +## Troubleshooting + +If you encounter connectivity issues: + +1. Verify your VPN connection is active +2. Check that your VPN routes include the subnet of your Dragonfly instance +3. Ensure your firewall rules allow traffic to the Dragonfly port +4. Confirm your Dragonfly instance's network policy allows your VPN subnet + +For additional assistance, please contact Dragonfly Cloud support. \ No newline at end of file diff --git a/docs/cloud/connect/vpn/vpn.md b/docs/cloud/connect/vpn/vpn.md index 482e0f7..b3ec6ef 100644 --- a/docs/cloud/connect/vpn/vpn.md +++ b/docs/cloud/connect/vpn/vpn.md @@ -16,3 +16,4 @@ The following guide(s) will show you how to connect to a private endpoint Dragon While this method enables access to private resources, one should always **follow your organization's security policies and exercise caution when interacting with production data stores**. - [AWS Client VPN](aws.md) +- [Google Cloud VPN](gcp.md) \ No newline at end of file