Updated 2025-02-12

Setting Up Site-to-Site VPN

This topic gives instructions for constructing a Site-to-Site VPN IPSec connection from an on-premises network to a VCN. For general information about Site-to-Site VPN, see Site-to-Site VPN Overview.

Before You Get Started

To prepare, do these things first:

Tip

If you have an existing Site-to-Site VPN that uses static routing, you can change the tunnels to instead use BGP dynamic routing.

The following link local IP ranges aren't valid for use with Site-to-Site VPN inside tunnel interfaces:

  • 169.254.10.0 to 169.254.19.255
  • 169.254.100.0 to 169.254.109.255
  • 169.254.192.0 to 169.254.201.255

Overall Process

Here's the overall process for setting up Site-to-Site VPN:

  1. Complete the tasks listed in Before You Get Started.
  2. Set up Site-to-Site VPN components (instructions in Example: Setting Up a Proof of Concept Site-to-Site VPN):
    1. Create a VCN.
    2. Create a DRG.
    3. Attach the DRG to the VCN.
    4. Create a route table and route rule for the DRG.
    5. Create a security list and required rules.
    6. Create a subnet in the VCN.
    7. Create a CPE object and provide the CPE device's public IP address.
    8. Create an IPSec connection to the CPE object and provide required routing information.
  3. Use the CPE Configuration Helper: A network engineer must configure the CPE device with information that Oracle provides during the previous steps. The CPE Configuration Helper generates the information for the network engineer. For more information, see Using the CPE Configuration Helper and also CPE Configuration.
  4. Have a network engineer configure the CPE device.
  5. Validate connectivity.

If you plan to set up redundant connections, see the Connectivity redundancy guide (PDF).

Example: Setting Up a Proof of Concept Site-to-Site VPN

Tip

Oracle offers a quickstart workflow to make it easier to set up Site-to-Site VPN. For more information, see Site-to-Site VPN Wizard.

This example scenario shows how to set up a Site-to-Site VPN with a layout that you might use for a proof of concept (POC). It follows tasks 1 and 2 in Overall Process and shows each component in the layout being created. For more complex layouts, see Example Layout with Multiple Geographic Areas or Example Layout with PAT.

Example Layout with Multiple Geographic Areas

The following diagram shows a different example with the following configuration:

  • Two networks in separate geographical areas that each connect to a VCN
  • A single CPE device in each area
  • Two IPSec VPNs (one for each CPE device)

Be aware that each Site-to-Site VPN has two routes associated with it: one for the particular geographical area's subnet, and a default 0.0.0.0/0 route. Oracle learns about the available routes for each tunnel either through BGP (if the tunnels use BGP), or because you set them as static routes for the IPSec connection (if the tunnels use static routing).

This image shows a layout with two geographical areas and two routers
Callout 1: Site-to-Site VPN 1 route table
Destination CIDR Route target
10.20.0.0/16 DRG
0.0.0.0/0 DRG
Callout 2: Site-to-Site VPN 2 route table
Destination CIDR Route target
10.40.0.0/16 DRG
0.0.0.0/0 DRG

Following are some examples of situations in which the 0.0.0.0/0 route can provide flexibility:

  • Assume that the CPE 1 device goes down (see the next diagram). If Subnet 1 and Subnet 2 can communicate with each other, the VCN could still reach the systems in Subnet 1 because of the 0.0.0.0/0 route that goes to CPE 2.
    This image shows a layout where one of the CPE routers goes down
  • If an organization adds a new geographical area with Subnet 3 and initially connects it to Subnet 2 (see the next diagram). If you added a route rule to the VCN's route table for Subnet 3, the VCN could reach systems in Subnet 3 because of the 0.0.0.0/0 route that goes to CPE 2.

    This image shows a layout with a new subnet
    Callout 1: VCN route table
    Destination CIDR Route target
    10.20.0.0/16 DRG
    10.40.0.0/16 DRG
    10.60.0.0/16 DRG

Example Layout with PAT

The following diagram shows an example with this configuration:

  • Two networks in separate geographical areas that each connect to a VCN
  • Redundant CPE devices (two in each geographical area)
  • Four IPSec VPNs (one for each CPE device)
  • Port address translation (PAT) for each CPE device

For each of the four connections, the route that Oracle needs to know about is the PAT IP address for the specific CPE device. Oracle learns about the PAT IP address route for each tunnel either through BGP (if the tunnels use BGP), or because you set the relevant address as a static route for the IPSec connection (if the tunnels use static routing).

When you set up the route rules for the VCN, you specify a rule for each PAT IP address (or an aggregate CIDR that covers them all) with the DRG as the rule's target.

This image shows a scenario with several IPSec VPNs, routers, and PAT
Callout 1: VCN route table
Destination CIDR Route target
PAT IP 1 DRG
PAT IP 2 DRG
PAT IP 3 DRG
PAT IP 4 DRG