How to Set Up a Cloud Site-to-Site VPN
A practical step-by-step guide to setting up a secure, reliable site-to-site VPN between your on-premises network and your cloud environment.
Step 1: Define Your Connectivity Requirements
Before configuring anything, document which on-premises networks need to reach which cloud virtual networks, the expected bandwidth and latency requirements for the workloads involved, and whether high availability is required given the business criticality of the connection. A site-to-site VPN connecting a branch office to a development environment has very different requirements than one carrying production database replication traffic, and this distinction should drive every decision that follows, including whether a VPN is sufficient or a dedicated connection like AWS Direct Connect or Azure ExpressRoute is actually warranted.
Step 2: Choose Your VPN Gateway Type
Each major cloud provider offers a managed VPN gateway service, AWS Site-to-Site VPN, Azure VPN Gateway, and Google Cloud VPN. Select the gateway SKU or tier based on required throughput, since underprovisioned gateways become a bottleneck that is often misdiagnosed as an application performance issue rather than a network capacity limit. Decide between a policy-based or route-based VPN configuration, with route-based generally preferred for its flexibility in supporting multiple subnets and dynamic routing protocols.
Step 3: Configure the On-Premises Customer Gateway
Identify the public IP address and VPN device model of your on-premises firewall or router that will terminate the connection. Most cloud providers generate downloadable configuration templates specific to common vendor devices such as Cisco, Palo Alto, or Fortinet, which significantly reduces manual configuration errors. Confirm your on-premises device supports the required IKE version, encryption algorithms, and Diffie-Hellman group that the cloud provider’s gateway expects, since mismatched cryptographic parameters are the most common cause of tunnels that fail to establish.
Step 4: Create the Virtual Private Gateway and Customer Gateway Objects
Within the cloud console, create the virtual private gateway and attach it to your target virtual network or VPC. Create a customer gateway object representing your on-premises device, specifying its public IP address and the BGP ASN if you intend to use dynamic routing. Create the VPN connection object linking the two gateways, and download the generated configuration file for your specific on-premises device model.
Step 5: Apply Configuration to the On-Premises Device
Load the downloaded configuration onto your on-premises firewall or router, adjusting any organization-specific values such as internal routing policies or firewall rule references that the generic template cannot anticipate. Open the required UDP ports, typically 500 and 4500, along with ESP protocol traffic, on any intermediate firewalls between your device and the internet. Verify NAT traversal settings are correctly configured if your on-premises device sits behind a NAT gateway rather than having a direct public IP.
Step 6: Establish and Verify the Tunnel
Initiate the connection from the on-premises side and monitor both the cloud console and on-premises device logs for tunnel establishment status. Verify phase one and phase two security association establishment in the logs, since a tunnel can show as up at phase one while still failing to pass traffic due to phase two mismatches. Test connectivity with simple ICMP pings between a host on each side before attempting application-level traffic, isolating network-layer issues from application-layer issues.
Step 7: Configure Routing and High Availability
If using dynamic routing via BGP, verify routes are being correctly advertised and received on both sides, and set appropriate route priorities if multiple paths exist. For business-critical connections, configure a redundant second tunnel, ideally terminating on a different on-premises device or at minimum a different public IP, and test automatic failover by deliberately bringing down the primary tunnel in a maintenance window.
Step 8: Monitor and Maintain the Connection
Enable cloud-native monitoring for tunnel status and bandwidth utilization, setting alerts for tunnel downtime and for bandwidth approaching the gateway’s provisioned capacity. Document the full configuration, including pre-shared keys stored securely in a secrets manager rather than in plain text documentation, and schedule a periodic review of encryption algorithms against current security best practices.
A properly configured and monitored site-to-site VPN is foundational to secure hybrid cloud connectivity. Symhas designs and implements resilient network architectures across AWS, Azure, Google Cloud, and OCI for enterprises managing complex hybrid environments. Contact Symhas to review your cloud connectivity strategy.
Frequently Asked Questions
When should I use a dedicated connection instead of a VPN?
Use a dedicated connection like Direct Connect or ExpressRoute when you need consistent high bandwidth, lower latency, or are moving large volumes of production data regularly.
Why does my VPN tunnel show as up but traffic does not pass?
This usually indicates a phase two security association mismatch or a routing configuration issue, even though phase one authentication succeeded.
Is a redundant VPN tunnel necessary for every connection?
It is recommended for any connection carrying production or business-critical traffic, but may be unnecessary for low-priority development or test environments.
