Deleting a VPN Connection Route

You can delete a static route of a VPN connection.

For more information about your VPN connection routes, see Getting Information About Your VPN Connections.

This action is for static routing only. If your VPN connection uses dynamic routing, you do not need to create routes.

Deleting a VPN Connection Route Using Cockpit v2

  1. In the VPN Connections dashboard, click the IconView details icon of the VPN connection you want to delete a route from.
    The VPN connection details panel appears.

  2. Check the box of the VPN connection route you want to delete.
    The VPN connection route is selected.

  3. Click IconTerminate Delete.
    A confirmation dialog box appears.

  4. Click Delete.
    The VPN connection route is deleted.

Deleting a VPN Connection Route Using OSC CLI

The DeleteVpnConnectionRoute command deletes a static route to a VPN connection previously created using the CreateVpnConnectionRoute method.

Request sample
$ osc-cli api DeleteVpnConnectionRoute --profile "default" \
    --VpnConnectionId "vpn-12345678" \
    --DestinationIpRange "10.0.0.0/16"

This command contains the following attributes that you need to specify:

  • DestinationIpRange: The network prefix of the route to delete, in CIDR notation (for example, 10.12.0.0/16).

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • VpnConnectionId: The ID of the target VPN connection of the static route to delete.

The DeleteVpnConnectionRoute command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting a VPN Connection Route Using oapi-cli

The DeleteVpnConnectionRoute command deletes a static route to a VPN connection previously created using the CreateVpnConnectionRoute method.

Request sample
$ oapi-cli --profile "default" DeleteVpnConnectionRoute \
    --VpnConnectionId "vpn-12345678" \
    --DestinationIpRange "10.0.0.0/16"

This command contains the following attributes that you need to specify:

  • DestinationIpRange: The network prefix of the route to delete, in CIDR notation (for example, 10.12.0.0/16).

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • VpnConnectionId: The ID of the target VPN connection of the static route to delete.

The DeleteVpnConnectionRoute command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting a VPN Connection Route Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To delete a VPN connection route, use the delete-vpn-connection-route command following this syntax:

Request sample
$ aws ec2 delete-vpn-connection-route \
    --profile YOUR_PROFILE \
    --vpn-connection-id vpn-c750ea06 \
    --destination-cidr-block 172.0.0.0/24 \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • vpn-connection-id: The ID of the VPN connection from which you want to delete a route.

  • destination-cidr-block: The range of IPs of the corporate network, in CIDR notation.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The specified VPN connection route is deleted.

Deleted resources remain visible for 1 hour.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.