Scaleway logo
Commands

Documentation for `scw s2s-vpn`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

This API allows you to manage your Site-to-Site VPN.

A connection represents the IPsec tunnel between VPN gateway and customer gateway.

A connection represents the IPsec tunnel between VPN gateway and customer gateway.

Create a connection

Create a connection.

Usage:

TerminalCode
scw s2s-vpn connection create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameName of the connectionRequired
tags.{index}List of tags to apply to the connection
is-ipv6Defines IP version of the IPSec Tunnel
initiation-policyWho initiates the IPsec tunnelRequired
One of: unknown_initiation_policy, vpn_gateway, customer_gateway
ikev2-ciphers.{index}.encryptionOne of: unknown_encryption, aes128, aes192, aes256, aes128gcm, aes192gcm, aes256gcm, aes128ccm, aes256ccm, chacha20poly1305
ikev2-ciphers.{index}.integrityOne of: unknown_integrity, sha256, sha384, sha512
ikev2-ciphers.{index}.dh-groupOne of: unknown_dhgroup, modp2048, modp3072, modp4096, ecp256, ecp384, ecp521, curve25519
esp-ciphers.{index}.encryptionOne of: unknown_encryption, aes128, aes192, aes256, aes128gcm, aes192gcm, aes256gcm, aes128ccm, aes256ccm, chacha20poly1305
esp-ciphers.{index}.integrityOne of: unknown_integrity, sha256, sha384, sha512
esp-ciphers.{index}.dh-groupOne of: unknown_dhgroup, modp2048, modp3072, modp4096, ecp256, ecp384, ecp521, curve25519
enable-route-propagationDefines whether route propagation is enabled or not.
secret.id
secret.revision
vpn-gateway-idID of the VPN gateway to attach to the connectionRequired
customer-gateway-idID of the customer gateway to attach to the connectionRequired
bgp-config-ipv4.routing-policy-id
bgp-config-ipv4.private-ip
bgp-config-ipv4.peer-private-ip
bgp-config-ipv6.routing-policy-id
bgp-config-ipv6.private-ip
bgp-config-ipv6.peer-private-ip
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete a connection

Delete an existing connection, specified by its connection ID.

Usage:

TerminalCode
scw s2s-vpn connection delete <connection-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
connection-idID of the connection to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Detach a routing policy

Detach an existing routing policy from a connection, specified by its connection ID.

Usage:

TerminalCode
scw s2s-vpn connection detach-routing-policy <connection-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
connection-idID of the connection from which routing policy is being detachedRequired
routing-policy-v4ID of the routing policy to detach from the BGP IPv4 session
routing-policy-v6ID of the routing policy to detach from the BGP IPv6 session
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Disable route propagation

Prevent any prefixes from being announced in the BGP session. Traffic will not be able to flow over the VPN Gateway until route propagation is re-enabled.

Usage:

TerminalCode
scw s2s-vpn connection disable-route-propagation <connection-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
connection-idID of the connection on which to disable route propagationRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Enable route propagation

Enable all allowed prefixes (defined in a routing policy) to be announced in the BGP session. This allows traffic to flow between the attached VPC and the on-premises infrastructure along the announced routes. Note that by default, even when route propagation is enabled, all routes are blocked. It is essential to attach a routing policy to define the ranges of routes to announce.

Usage:

TerminalCode
scw s2s-vpn connection enable-route-propagation <connection-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
connection-idID of the connection on which to enable route propagationRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get a connection

Get a connection for the given connection ID. The response object includes information about the connection's various configuration details.

Usage:

TerminalCode
scw s2s-vpn connection get <connection-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
connection-idID of the requested connectionRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

List connections

List all your connections. A number of filters are available, including Project ID, name, tags and status.

Usage:

TerminalCode
scw s2s-vpn connection list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder in which to return resultsOne of: created_at_asc, created_at_desc, name_asc, name_desc, status_asc, status_desc
project-idProject ID to filter for
nameConnection name to filter for
tags.{index}Tags to filter for
statuses.{index}Connection statuses to filter forOne of: unknown_status, active, limited_connectivity, down, locked
is-ipv6Filter connections with IP version of IPSec tunnel
routing-policy-ids.{index}Filter for connections using these routing policies
route-propagation-enabledFilter for connections with route propagation enabled
vpn-gateway-ids.{index}Filter for connections attached to these VPN gateways
customer-gateway-ids.{index}Filter for connections attached to these customer gateways
organization-idOrganization ID to filter for
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all

Renew pre-shared key

Renew pre-shared key for a given connection.

Usage:

TerminalCode
scw s2s-vpn connection renew-psk <connection-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
connection-idID of the connection to renew the PSKRequired
generate-revisionGenerate a new version or update to the latest existing oneDefault: true
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Set a new routing policy

Set a new routing policy on a connection, overriding the existing one if present, specified by its connection ID.

Usage:

TerminalCode
scw s2s-vpn connection set-routing-policy <connection-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
connection-idID of the connection whose routing policy is being updatedRequired
routing-policy-v4ID of the routing policy to set for the BGP IPv4 session
routing-policy-v6ID of the routing policy to set for the BGP IPv6 session
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Update a connection

Update an existing connection, specified by its connection ID.

Usage:

TerminalCode
scw s2s-vpn connection update <connection-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
connection-idID of the connection to updateRequired
nameName of the connection
tags.{index}List of tags to apply to the connection
initiation-policyWho initiates the IPsec tunnelOne of: unknown_initiation_policy, vpn_gateway, customer_gateway
ikev2-ciphers.{index}.encryptionOne of: unknown_encryption, aes128, aes192, aes256, aes128gcm, aes192gcm, aes256gcm, aes128ccm, aes256ccm, chacha20poly1305
ikev2-ciphers.{index}.integrityOne of: unknown_integrity, sha256, sha384, sha512
ikev2-ciphers.{index}.dh-groupOne of: unknown_dhgroup, modp2048, modp3072, modp4096, ecp256, ecp384, ecp521, curve25519
esp-ciphers.{index}.encryptionOne of: unknown_encryption, aes128, aes192, aes256, aes128gcm, aes192gcm, aes256gcm, aes128ccm, aes256ccm, chacha20poly1305
esp-ciphers.{index}.integrityOne of: unknown_integrity, sha256, sha384, sha512
esp-ciphers.{index}.dh-groupOne of: unknown_dhgroup, modp2048, modp3072, modp4096, ecp256, ecp384, ecp521, curve25519
secret-idSecret ID in the client's project containing the PSK
secret-revisionSecret version in the client's project containing the PSK.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

A customer gateway represents a Scaleway client's device that communicates with a VPN gateway.

A customer gateway represents a Scaleway client's device that communicates with a VPN gateway.

Create a customer gateway

Create a customer gateway.

Usage:

TerminalCode
scw s2s-vpn customer-gateway create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameName of the customer gatewayRequired
tags.{index}List of tags to apply to the customer gateway
ipv4-publicPublic IPv4 address of the customer gateway
ipv6-publicPublic IPv6 address of the customer gateway
asnAS Number of the customer gatewayRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete a customer gateway

Delete an existing customer gateway, specified by its customer gateway ID.

Usage:

TerminalCode
scw s2s-vpn customer-gateway delete <gateway-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
gateway-idID of the customer gateway to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get a customer gateway

Get a customer gateway for the given customer gateway ID.

Usage:

TerminalCode
scw s2s-vpn customer-gateway get <gateway-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
gateway-idID of the requested customer gatewayRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

List customer gateways

List all your customer gateways. A number of filters are available, including Project ID, name, and tags.

Usage:

TerminalCode
scw s2s-vpn customer-gateway list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder in which to return resultsOne of: created_at_asc, created_at_desc, name_asc, name_desc
project-idProject ID to filter for
nameCustomer gateway name to filter for
tags.{index}Tags to filter for
organization-idOrganization ID to filter for
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all

Update a customer gateway

Update an existing customer gateway, specified by its customer gateway ID. You can update its name, tags, public IPv4 & IPv6 address and AS Number.

Usage:

TerminalCode
scw s2s-vpn customer-gateway update <gateway-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
gateway-idID of the customer gateway to updateRequired
nameName of the customer gateway
tags.{index}List of tags to apply to the customer gateway
ipv4-publicPublic IPv4 address of the customer gateway
ipv6-publicPublic IPv6 address of the customer gateway
asnAS Number of the customer gateway
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

By default, all routes across the Site-to-Site VPN (between VPN gateway and customer gateway) are blocked. Routing policies allow you to set filters to define the IP prefixes to allow.

By default, all routes across the Site-to-Site VPN (between VPN gateway and customer gateway) are blocked. Routing policies allow you to set filters to define the IP prefixes to allow.

Create a routing policy

Create a routing policy. Routing policies allow you to set IP prefix filters to define the incoming route announcements to accept from the customer gateway, and the outgoing routes to announce to the customer gateway.

Usage:

TerminalCode
scw s2s-vpn routing-policy create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameName of the routing policyRequired
tags.{index}List of tags to apply to the routing policy
is-ipv6IP prefixes version of the routing policy
prefix-filter-in.{index}IP prefixes to accept from the peer (ranges of route announcements to accept)
prefix-filter-out.{index}IP prefix filters to advertise to the peer (ranges of routes to advertise)
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete a routing policy

Delete an existing routing policy, specified by its routing policy ID.

Usage:

TerminalCode
scw s2s-vpn routing-policy delete <routing-policy-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
routing-policy-idID of the routing policy to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get routing policy

Get a routing policy for the given routing policy ID. The response object gives information including the policy's name, tags and prefix filters.

Usage:

TerminalCode
scw s2s-vpn routing-policy get <routing-policy-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
routing-policy-idID of the routing policy to getRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

List routing policies

List all routing policies in a given region. A routing policy can be attached to one or multiple connections (S2S VPN connections).

Usage:

TerminalCode
scw s2s-vpn routing-policy list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder in which to return resultsOne of: created_at_asc, created_at_desc, name_asc, name_desc
project-idProject ID to filter for
nameRouting policy name to filter for
tags.{index}Tags to filter for
ipv6Filter for the routing policies based on IP prefixes version
organization-idOrganization ID to filter for
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all

Update a routing policy

Update an existing routing policy, specified by its routing policy ID. Its name, tags and incoming/outgoing prefix filters can be updated.

Usage:

TerminalCode
scw s2s-vpn routing-policy update <routing-policy-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
routing-policy-idID of the routing policy to updateRequired
nameName of the routing policy
tags.{index}List of tags to apply to the routing policy
prefix-filter-in.{index}IP prefixes to accept from the peer (ranges of route announcements to accept)
prefix-filter-out.{index}IP prefix filters for routes to advertise to the peer (ranges of routes to advertise)
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

A VPN gateway is an IPsec peer managed by Scaleway. It can support multiple connections to customer gateways.

A VPN gateway is an IPsec peer managed by Scaleway. It can support multiple connections to customer gateways.

Create VPN gateway

Create VPN gateway.

Usage:

TerminalCode
scw s2s-vpn vpn-gateway create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameName of the VPN gatewayRequired
tags.{index}List of tags to apply to the VPN gateway
gateway-typeVPN gateway type (commercial offer type)Required
public-config.ipam-ipv4-id
public-config.ipam-ipv6-id
private-network-idID of the Private Network to attach to the VPN gatewayRequired
public-tunnel-config.single-ipv4-tunnel.ipam-id
public-tunnel-config.single-ipv6-tunnel.ipam-id
public-tunnel-config.dual-ipv4v6-tunnel.ipam-ipv4-id
public-tunnel-config.dual-ipv4v6-tunnel.ipam-ipv6-id
ipam-private-ipv4-idID of the IPAM private IPv4 address to attach to the VPN gateway
ipam-private-ipv6-idID of the IPAM private IPv6 address to attach to the VPN gateway
zoneAvailability Zone where the VPN gateway should be provisioned. If no zone is specified, the VPN gateway will be automatically placed.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete a VPN gateway

Delete an existing VPN gateway, specified by its VPN gateway ID.

Usage:

TerminalCode
scw s2s-vpn vpn-gateway delete <gateway-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
gateway-idID of the VPN gateway to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get a VPN gateway

Get a VPN gateway for the given VPN gateway ID.

Usage:

TerminalCode
scw s2s-vpn vpn-gateway get <gateway-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
gateway-idID of the requested VPN gatewayRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

List VPN gateways

List all your VPN gateways. A number of filters are available, including Project ID, name, tags and status.

Usage:

TerminalCode
scw s2s-vpn vpn-gateway list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder in which to return resultsOne of: created_at_asc, created_at_desc, name_asc, name_desc, type_asc, type_desc, status_asc, status_desc
project-idProject ID to filter for
nameVPN gateway name to filter for
tags.{index}Tags to filter for
statuses.{index}VPN gateway statuses to filter forOne of: unknown_status, configuring, failed, provisioning, active, deprovisioning, locked
gateway-types.{index}Filter for VPN gateways of these types
private-network-ids.{index}Filter for VPN gateways attached to these private networks
organization-idOrganization ID to filter for
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all

Update a VPN gateway

Update an existing VPN gateway, specified by its VPN gateway ID. Only its name and tags can be updated.

Usage:

TerminalCode
scw s2s-vpn vpn-gateway update <gateway-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
gateway-idID of the VPN gateway to updateRequired
nameName of the VPN gateway
tags.{index}List of tags to apply to the VPN Gateway
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

VPN gateways come in various shapes, sizes and prices, which are described by VPN gateway types. They represent the different commercial offer types for VPN gateways available at Scaleway.

VPN gateways come in various shapes, sizes and prices, which are described by VPN gateway types. They represent the different commercial offer types for VPN gateways available at Scaleway.

List VPN gateway types

List the different VPN gateway commercial offer types available at Scaleway. The response is an array of objects describing the name and technical details of each available VPN gateway type.

Usage:

TerminalCode
scw s2s-vpn vpn-gateway-type list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all