Note:

Set up OpenVPN for Remote Access in a Single Region on Oracle Cloud Infrastructure

Introduction

With remote work and cloud adoption on the rise, secure access to company resources has never been more critical. A Remote Access VPN allows users to connect to their organization’s network from anywhere, encrypting all data to protect it from unauthorized access. Whether working from a remote office, home, or on the go, a Virtual Private Network (VPN) ensures that connections remain private and secure.

image

In this tutorial series, we will take you step-by-step through the process of building the architecture outlined in the following image.

image

VPN in Oracle Cloud Infrastructure (OCI)

VPN is essential for establishing secure communication between your on-premises data center, another cloud environment your organization uses, or remote offices, with your OCI setup. In OCI, there are two types of VPNs you might need, each suited for different use cases.

Note: This tutorial focuses only on setting up Remote Access VPN using OpenVPN.

Overview of OpenVPN

OpenVPN is a widely used VPN solution that is available in multiple flavors to suit different needs. In this tutorial, we will focus on:

For more information about different OpenVPN products, see Which OpenVPN product is right for you?.

Objectives

Final Architecture for the first part of the tutorial

You will build the following environment from scratch.

image

Prerequisites

Task 1: Create a Dynamic Routing Gateway

Task 2: Set up a Spoke Virtual Cloud Network

Task 2.1: Create a VCN

Task 2.2: Attach the VCN to the DRG

Task 2.3: Create a Private Subnet

Task 2.4: Configure Routing and Security on the Subnet

Task 3: Provision a Test VM (Target-Instance-1)

Task 3.1: Generate SSH Key Pair with PuTTY Key Generator (Optional)

Notes:

  1. We are using PuTTY in this tutorial to generate SSH keys and to access the VMs, but feel free to use any other similar tool of your choice.
  2. This is needed only if SSH access is required to the instance. In this tutorial, we are going to test by only pinging the instance.

Task 3.2: Provision Target-Instance-1 Compute Instance

Note: In the previous step, select “No SSH keys” option if you are not planning to access the instance.

Task 4: Set up Hub Virtual Cloud Network

Task 4.1: Create a VCN

Task 4.2: Attach the VCN to the DRG

Task 4.3: Create an Internet Gateway

Task 4.4: Create a Public Subnet

Task 4.5: Configure Routing and Security on the Subnet

Task 5: Provision and Configure OpenVPN Access Server

Task 5.1: Provision OpenVPN from marketplace

Task 5.2: Access OpenVPN VM from PuTTY and Complete the Initial Setup

Task 5.3: Configure Remote Access

Task 6: Test and Validate

Task 6.1: Install OpenVPN Connect

Task 6.2: Set up OpenVPN Connect

Task 6.3: Ping Target-Instance-1 Instance

Next Steps

In the second part of the tutorial Set up OpenVPN for Remote Access Across Multiple Regions on Oracle Cloud Infrastructure, we are going to extend the same setup to include another region which we will connect with remote peering connection. You will use the same OpenVPN Access Server to connect to resources in the new Disaster Recovery region after setting up the required network configuration.

Acknowledgments

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.