Note:

Use Oracle Cloud Infrastructure Site-to-Site VPN service in HA mode with ECMP routing from Linux and Libreswan

Introduction

In today’s interconnected world, ensuring the availability and security of data transmitted across networks is key. To address this critical need, Oracle Cloud offers robust networking capabilities, including the ability to establish highly available IPSec tunnels. In this tutorial, we will explore the concept of high availability IPSec tunnels and guide you through the process of setting up a resilient network architecture in Oracle Cloud using Equal-cost multi-path (ECMP) protocol.

In this tutorial, we will focus on utilizing Oracle Linux, a powerful and secure operating system optimized for Oracle Cloud environments, along with Libreswan, a well-established IPSec client, to establish IPSec tunnels in route-based mode. We will leverage the Dynamic Routing Gateway (DRG) functionality provided by Oracle Cloud Infrastructure (OCI) to enable seamless failover and load balancing between multiple IPSec tunnels.

Objectives

Provide a comprehensive guide to implementing IPSec Tunnels in OCI using ECMP routing protocol for load balancing traffic along them in active/active scenario.

By following this tutorial, you will gain a comprehensive understanding of IPSec in OCI. You will acquire the skills necessary to effectively interconnect your on-premises infrastructure with OCI through a redundant connection.

Prerequisites

Note: It is recommended that you have a test environment set up in OCI for experimenting with networking configurations and IPSec before implementing them in a Production environment.

What’s IPSec VPN

Internet Protocol security (IPSec) is a framework of open standards for helping to ensure private, secure communications over Internet Protocol (IP) networks through the use of cryptographic security services. IPSec supports network-level data integrity, data confidentiality, data origin authentication, and replay protection. Because IPSec is integrated at the Internet layer (layer 3), it provides security for almost all protocols in the TCP/IP suite, and because IPSec is applied transparently to applications, there is no need to configure separate security for each application that uses TCP/IP.

IPSec helps provide defense-in-depth against network-based attacks from untrusted computers, attacks that can result in the denial-of-service of applications, services, or the network.

Site-to-Site VPN

A site-to-site IPSec (Internet Protocol Security) VPN, also known as a network-to-network VPN, establishes a secure and encrypted connection between two or more networks over the internet. It enables the secure transmission of data between geographically distributed sites, creating a virtual private network (VPN) that extends the network’s reach beyond its physical boundaries.

In a site-to-site IPSec VPN, the participating networks, typically belonging to different organizations or remote branches of the same organization, are connected via dedicated IPSec tunnels. These tunnels encapsulate and encrypt network traffic, ensuring its confidentiality, integrity, and authenticity while traversing untrusted networks such as the internet.

On the other hand, a point-to-site VPN (P2S) establishes a secure connection between individual client devices and a remote network. Unlike site-to-site VPNs, which connect networks, P2S VPNs enable secure remote access for individual devices to access the network resources. P2S VPNs are commonly used to enable secure access for remote employees, contractors, or mobile users who need to connect to the organization’s network from external locations.

Note: This tutorial scope is limited to Site-to-Site IPSec VPN that is currently the only one supported in OCI DRGv2.

VPN IPSec Tunnels Concepts

IPSec stands for Internet Protocol Security or IP Security. IPSec is a protocol suite that encrypts the entire IP traffic before the packets are transferred from the source node to the destination. IPSec can be configured in two modes:

IPSec VPN site-to-site tunnels offer the following advantages:

Note: OCI Site-to-Site VPN ONLY supports tunnel mode so that will be the only mode available in OCI.

Architecture

Architecture

OCI IPSec with ECMP consist of lists which include:

Task 1: Configure OCI Settings

For this tutorial, we have created one Oracle Linux 7 VM instance and installed Libreswan 3.25 on it. In order to install Libreswan into Linux, you can follow the following Oracle documentation: Access to Other Clouds with Libreswan. You can install Libreswan in the environment of your choice. For this tutorial, we have chosen another remote region in OCI as the Libreswan client and tunnel initiator.

Once you have installed Libreswan (without configuring it yet), note the public IP of your Linux 7 VM as well as the private IPv4 CIDR range where you installed Libreswan in.

Now, let’s configure the OCI Settings

Task 2: Configure Linux and Libreswan Settings

This part of the tutorial will focus on the Linux OS and Libreswan configuration steps. The Libreswan we previously installed will act as a Site-to-Site Tunnel initiator and OCI DRG as a Tunnel responder.

Task 3: Configure IP routing and Tunnel traffic

This part of the tutorial will focus on IP routing and Tunnel traffic.

Task 4: Configure ECMP load balancing and redundancy

This part of the tutorial will focus on ECMP load balancing and redundancy.

Acknowledgments

Authors - Luis Catalán Hernández (OCI Cloud Network Specialist and Multi Cloud), Antonio Gamir (OCI Cloud Network Specialist)

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.