Setup a VPN Connection into an ARO Cluster with OpenVPN
This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.
When you configure an Azure Red Hat OpenShift (ARO) cluster with a private only configuration, you will need connectivity to this private network in order to access your cluster. This guide will show you how to configute a point-to-site VPN connection so you won’t need to setup and configure Jump Boxes.
Prerequisites
- a private ARO Cluster
- git
- openssl
Create certificates to use for your VPN Connection
There are many ways and methods to create certificates for VPN, the guide below is one of the ways that works well. Note, that whatever method you use, make sure it supports “X509v3 Extended Key Usage”.
Clone OpenVPN/easy-rsa
Change to the easyrsa directory
Initialize the PKI
Edit certificate parameters
Copy the sample values file
Uncomment and edit the copied template with your values
Uncomment (remove the #) the folowing field
Create the CA:
Generate the Server Certificate and Key
Generate Diffie-Hellman (DH) parameters
Generate client credentials
Set environment variables for the CA certificate you just created.
Set Envrionment Variables
Create an Azure Virtual Network Gateway
Request a public IP Address
Create a Gateway Subnet
Create a virtual network gateway
go grab a coffee, this takes about 15 - 20 minutes
Configure your OpenVPN Client
Retrieve the VPN Settings
From the Azure Portal - navigate to your Virtual Network Gateway, point to site configuration, and then click Download VPN Client.
This will download a zip file containing the VPN ClientCreate a VPN Client Configuration
Uncompress the file you downloaded in the previous step and edit the OpenVPN\vpnconfig.ovpn file.
Note: The next two commands assume you are still in the easyrsa3 directory.
In the vpnconfig.ovpn replace the $CLIENTCERTIFICATE line with the entire contents of:
Make sure to copy the —–BEGIN CERTIFICATE—– and the —–END CERTIFICATE—– lines.
also replace $PRIVATEKEY line with the output of:
Make sure to copy the —–BEGIN PRIVATE KEY—– and the —–END PRIVATE KEY—– lines.
add the new OpenVPN configuration file to your OpenVPN client.
mac users - just double click on the vpnserver.ovpn file and it will be automatically imported.
Connect your VPN.
