Services, policies, endpoint groups, and site connections

Understand the five VPN objects, the values each accepts, how they're shared, what their statuses mean, and which settings the peer device needs.

A site-to-site tunnel is built from five objects. Each one is a resource of its own, listed on its own tab under NetworkingVPN. This article describes what each object sets and the values it accepts, how objects are shared, what their statuses mean, and which settings the device at the other end of the tunnel needs.

The five objects

ObjectTabWhat it setsCan several connections use it?
VPN serviceVPN servicesThe router that the tunnels end on.Yes
IKE policyIKE policiesPhase 1: how the gateways authenticate each other and agree on keys.Yes
IPsec policyIPsec policiesPhase 2: how the traffic inside the tunnel is protected.Yes
Endpoint groupEndpoint groupsOne end of a tunnel: local subnets, or remote CIDRs.Yes
Site connectionSite connectionsThe tunnel to one peer gateway.No; it's the object that uses the others.

A site connection refers to one VPN service, one IKE policy, one IPsec policy, and two endpoint groups: a local one and a peer one. It doesn't copy them.

VPN services

A VPN service anchors tunnels on one router of the project.

  • Router. It must have an external gateway; the console lists only such routers. The router can't be changed after the service is created.
  • External address. The router's external gateway address, as the provider reports it. It's the local end of the tunnels and the address that the peer device connects to. Until the provider reports it, the console shows Not reported yet.
  • Status. The provider keeps a new VPN service at Pending create until the first site connection uses it. See Statuses.

One VPN service can carry many site connections. You can rename it and change its description while it's in use, but you can't delete it until no site connection uses it.

IKE policies

An IKE policy sets phase 1 of the tunnel.

FieldValuesDefault
IKE versionv1, v2v2
Phase 1 negotiation modemain, aggressivemain
Authentication algorithmsha1, sha256, sha384, sha512, aes-xcbc, aes-cmacsha256
Encryption algorithm3des, aes-128, aes-192, aes-256, and the CCM and GCM variants of AES-128, AES-192, and AES-256 with 8-, 12-, and 16-byte ICVs, such as aes-128-ccm-8 or aes-256-gcm-16aes-256
PFS groupgroup2, group5, and group14 to group31group14
Lifetime (seconds)At least 603600

On an IKE policy, PFS group is the Diffie-Hellman group of the phase 1 key exchange. Lifetimes are always in seconds.

IPsec policies

An IPsec policy sets phase 2 of the tunnel.

FieldValuesDefault
Transform protocolesp, ah, ah-espesp
Encapsulation modetunnel, transporttunnel
Authentication algorithmThe same values as for an IKE policysha256
Encryption algorithmThe same values as for an IKE policyaes-256
PFS groupThe same values as for an IKE policygroup14
Lifetime (seconds)At least 603600

On an IPsec policy, PFS group is the Diffie-Hellman group used when the phase 2 keys are renewed.

The values in both tables are the ones that the platform accepts. Choose values that the peer device supports too. For the values that keep the traffic encrypted, see VPN tunnels.

Endpoint groups

An endpoint group names one end of a tunnel.

TypeEndEndpoints
subnet (local end)LocalOne or more subnets of the project.
cidr (remote end)RemoteOne or more CIDRs, such as 172.16.0.0/16. In the console, separate them with commas, spaces, or semicolons.
  • A group lists each subnet or CIDR only once.
  • The type and the endpoints can't be changed after the group is created. You can change its name and description.
  • A site connection needs a subnet (local end) group as its local group and a cidr (remote end) group as its peer group. Every subnet in the local group must be attached to the router of the connection's VPN service.

Put every local subnet that should reach a peer into one group. A second site connection between the same two gateways doesn't work: the two gateways run a single IKE session, the provider refuses the second tunnel, and that connection carries no traffic although it shows a tunnel status. The platform doesn't stop you from creating it.

Site connections

A site connection is the tunnel between your VPN service and one peer gateway.

FieldRulesDefaultChange later?
Name1–255 characters, unique among the project's site connections.—Yes
VPN service, IKE policy, IPsec policyExisting objects in the project, finished creating.—No
Local endpoint group, Peer endpoint groupA subnet group and a CIDR group, as described under Endpoint groups.—No
Peer gateway addressThe public address of the remote VPN device.—To change the peer address, create a new connection and delete the old one.
Pre-shared keyAt least 8 characters. It can't be read back. You can only replace it.—Yes: enter a new key. Changing it renegotiates the tunnel.
Initiatorbi-directional or response-only. With response-only, this side waits for the peer to start the negotiation.bi-directionalYes
Dead peer detection actionhold, clear, disabled, restart, or restart-by-peer: what the gateway does when dead peer detection finds the peer unresponsive.holdYes
DPD interval (seconds)At least 1.30Yes
DPD timeout (seconds)At least 2, and greater than the interval.120Yes
MTUAt least 68, and at most the deployment's tenant network MTU.The console offers the smallest MTU of the project's networks. Without a value, the API uses the deployment's tenant network MTU.Yes

To change a connection, disable or restart its tunnel, or delete it, see Edit, disable, and delete VPN objects.

IKE identities. The IKE identities are always the two gateway addresses; you can't set them. The VPN service's external address identifies this side, and the peer gateway address identifies the peer.

MTU. The MTU is the tunnel's own. The packets that fit inside it are smaller, because ESP adds a header, a trailer, and authentication data to every packet. A workload sized for the full network MTU must lower its own MTU or clamp its TCP MSS. Packets that are too large fail with an error instead of disappearing.

Reuse and changes

VPN services, policies, and endpoint groups are shared. The Used by column counts the site connections that use each one. While the count is above 0, the object can't be deleted, and an IKE or IPsec policy can't be changed at all, not even renamed. A VPN service or an endpoint group can still be renamed.

A site connection keeps its VPN service, its policies, and its endpoint groups for its whole life. The provider doesn't let the service or the policies change, and the platform doesn't let the endpoint groups change. To use other objects, create a new site connection and delete the old one.

For the steps, see Edit, disable, and delete VPN objects.

Statuses

Every VPN object has a provisioning status, shown in the Provisioning column:

StatusWhat it means
Pending create, Pending update, Pending deleteThe platform is creating, changing, or deleting the object.
ReadyThe object exists at the provider with the settings shown.
ErrorThe last create, change, or deletion failed, or, for a site connection, the provider reports the connection in error. The object's details show What the provider reported with the reason.

VPN services and site connections also have a Status: the provider's own status, recorded as the provider reported it. It's Active, Down, Inactive, Error, or a pending state, and Not reported yet until the provider has reported one. For a site connection, this is the tunnel status. Active means that the tunnel's security associations are established. It doesn't prove that traffic passes; test that with traffic between the two networks.

The platform records the status when it finishes an operation on the object. For a site connection, that's creating it, changing its configuration, or enabling, disabling, or restarting it; a VPN service's status is read again when a site connection on it finishes creating. The platform also reads the project's VPN objects from the provider at regular intervals and records what the provider reports, except for an object with an operation in progress. Refresh on a connection's page reloads the connection's record from the platform; it doesn't make the platform ask the provider.

Configure the peer device

The device at the other end of the tunnel needs settings that match the site connection. Find each value in the console as follows. The policies and endpoint groups open from the References panel on the connection's page.

Setting on the peer deviceValueWhere to find it
Remote gateway addressThe VPN service's external address.External address on the VPN services tab
Its own gateway address and IKE identityThe address that you entered as the peer gateway address.Peer gateway and Peer ID on the connection's page
Remote IKE identityThe VPN service's external address.External address on the VPN services tab
AuthenticationThe pre-shared key.The key you entered; it can't be read back.
IKE version and phase 1 modeIKE version, Phase 1 negotiation modeIKE policy
Phase 1 encryption and integrityEncryption algorithm, Authentication algorithmIKE policy
Phase 1 Diffie-Hellman groupPFS groupIKE policy
Phase 1 lifetimeLifetime (seconds)IKE policy
Phase 2 protocol and modeTransform protocol, Encapsulation modeIPsec policy
Phase 2 encryption and integrityEncryption algorithm, Authentication algorithmIPsec policy
Phase 2 PFS groupPFS groupIPsec policy
Phase 2 lifetimeLifetime (seconds)IPsec policy
Its own networksThe CIDRs of the peer endpoint group.Peer endpoint group
Remote networksThe CIDRs of the subnets in the local endpoint group.Local endpoint group
Who starts the negotiationIf Initiator is response-only, the peer must start it.Initiator on the connection's page

On this page