strongSwan S2S VPN

Updated November 16, 2026

strongSwan S2S VPN connects a Yandex Virtual Private Cloud network to an existing remote VPN gateway over IPsec/IKEv2. The application creates a VM with two network interfaces: an external interface in a separate VPC with a public IP address, and an internal interface in a new subnet of your selected VPC.

The IPsec pre-shared key (PSK) is retrieved from a selected version of a Yandex Lockbox secret. SSH is disabled by default and is not required to configure the tunnel. You can enable access from an administrator network if needed.

The internal VPC is trusted for transit traffic; there is no separate allowlist of local CIDRs. You configure the remote gateway yourself. You must manually attach the application’s route table to client subnets, then detach and delete it before deleting the application.

Deployment instructions

Prerequisites

  1. Prepare an installation service account with the admin role, following the existing installation procedure. This is the installation account, separate from the VM service account created by the application.
  2. Select an existing VPC containing client subnets and prepare a remote gateway supporting IKEv2 and PSK authentication. Agree on its public IPv4 address, remote CIDRs, shared key, and IKE/ESP algorithm suites. Local and remote address ranges must not overlap.
  3. Create a Lockbox secret with a nonempty text value containing the PSK. You will select the secret, exact version, and entry key during installation. Configure the same PSK on the remote gateway.
  4. Check available Compute Cloud and VPC quotas, including route tables and static routes.

Installation

  1. In the management console, open Cloud Apps → Marketplace, select strongSwan S2S VPN, and click Use. Enter the application name and select the installation service account.
  2. Under Network, select the VPC, new internal subnet CIDR, and availability zone. Set an External subnet CIDR that does not overlap with local or remote networks. The application creates the external VPC, both subnets, and VM in the selected zone.
  3. Under IPsec tunnel, enter the remote gateway IP address and a comma-separated list of remote subnet CIDRs. Select the Lockbox secret, version, and entry key. Match IPsec IKE Proposal and IPsec ESP Proposal with the remote gateway. The defaults are aes128gcm16-prfsha256-ecp256 and aes128gcm16, respectively.
  4. Leave SSH access disabled, or enable it and provide a public SSH key and allowed administrator CIDR. Advanced settings lets you change the default 2 vCPUs and 4 GB RAM. The SSD size is 30 GB.
  5. Click Install. The application creates a dedicated VM service account with vpc.privateAdmin on the application folder to manage routes, and lockbox.payloadViewer on the selected secret to read the PSK.

Connection and verification

  1. Open IPsec gateway public IP address (gateway_address) and Remote gateway setup (remote_gateway_setup) in the installation outputs. Configure the remote gateway to use that public address, IKEv2, the same PSK, and the selected IKE/ESP suites. Allow the required VPN traffic between the gateways and configure return routes to your local client subnets.
  2. Using Route table (route_table_setup), locate ipsec-sgw-rt-<application-id> in the application folder. Attach it to the local client subnets that need access to the remote networks. If a subnet already has a route table, account for its routes first: attaching the new table replaces the existing association.
  3. Verify traffic between clients on both sides of the tunnel. Successful application installation or VM reachability alone does not confirm that IPsec works.
  4. If SSH is enabled, use SSH connection (ssh_connection_string): ssh admin@<public-IP>.

Updating settings and deleting the application

The application checks for changed settings approximately 30 seconds after the previous attempt completes. Changing VPN settings restarts the tunnel; changing the SSH key does not require a VPN restart. Changing vCPUs or RAM may stop the VM and interrupt connectivity.

Only the last successfully retrieved PSK is cached on the VM disk. The cache is used only when the secret, version, and entry key match exactly, and survives a VM reboot. IAM access is not rechecked on a cache hit. Changing the reference requires fetching the new value; if that fails, the old value for a different reference is not used. A new secret version is not selected automatically.

Manual changes to the route table’s routes are replaced when settings are next applied. Before deleting the application, detach the route table from client subnets and delete it manually. The remote gateway, existing VPC with its clients, and Lockbox secret remain under your management.

Migrating from the old incompatible template requires a separate new installation. Updating an old application to this template is not supported.

Free

The usage cost for the product and the minimum required resource configuration
Billing type
Free
Type
Cloud Apps
Category
Network infrastructure
Security
Publisher
Yandex Cloud
Use cases

Connect Yandex Cloud client subnets to an office or data center network through an IPsec tunnel to an existing remote gateway.

Technical support

Yandex Cloud technical support is available 24/7. The types of requests you can submit and the appropriate response time depend on your pricing plan. You can switch to the paid support plan in the management console. You can learn more about the technical support terms here.

Product IDs
Product:
f2eal03p94m173en2oen
Application resources
Resource typeQuantity
Virtual machine1
Service account1
Access rights for Lockbox secret 1
Access rights for folder1
VPC network1
VPC subnets2
VPC IP address1
VPC security groups3
Terms
By using this product you agree to the Yandex Cloud Marketplace Terms of Service

Free

The usage cost for the product and the minimum required resource configuration
Billing type
Free
Type
Cloud Apps
Category
Network infrastructure
Security
Publisher
Yandex Cloud