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 installed on your machine
- OpenVPN client software installed on your local machine
Setting Up Cloud VPN
Step 1: Create a VPN Gateway
- Navigate to the VPN page in the Google Cloud Console
- Click on "Create VPN Connection" and select "HA VPN"
- Enter a name for your VPN gateway
- Select the same region as your Dragonfly Cloud instance
- Click "Create"
Step 2: Create a Cloud Router
- Click "Create Cloud Router"
- Enter a name for your router
- Select the same region as your VPN gateway
- Choose a Google ASN (Autonomous System Number)
- Click "Create"
Step 3: Create External VPN Gateway
- Navigate to "External VPN gateways" in the left menu
- Click "Create external VPN gateway"
- Enter a name and the appropriate interface IP addresses
- Click "Create"
Step 4: Create VPN Tunnels
- Return to the HA VPN gateways page
- Click on your newly created gateway
- Click "Create VPN tunnel"
- Configure the tunnel settings to match your network requirements
- Create a second tunnel for high availability
- Configure BGP sessions for each tunnel
Step 5: Configure Client VPN
- Download the OpenVPN configuration file from the Google Cloud Console
- Import the configuration into your OpenVPN client
- Connect to your VPN using your credentials
Connecting to Dragonfly Cloud
Once your VPN connection is established:
- Use your standard Dragonfly client with the private endpoint address
- Your connection is now securely tunneled through the VPN
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:
- Verify your VPN connection is active
- Check that your VPN routes include the subnet of your Dragonfly instance
- Ensure your firewall rules allow traffic to the Dragonfly port
- Confirm your Dragonfly instance's network policy allows your VPN subnet
For additional assistance, please contact Dragonfly Cloud support.