coiai Logo

This article is an English translation of the original Japanese post. Read the Japanese original →

Apparently You Don't Need to Source vars in OpenVPN Easy-RSA Anymore

July 19, 2024

Categories: Linux · Tags: Ubuntu, VPN, サーバー

File: OpenVPN logo.svg

What is this?

sudo apt install openvpn easy-rsa
make-cadir ~/hoge
cd ~/hoge
source vars

When I ran this,

You appear to be sourcing an Easy-RSA *vars* file. This is
no longer necessary and is disallowed. See the section called
*How to use this file* near the top comments for more details.

this warning came up.
This article is about that.

Environment

2024/07/19

  • Distributor ID: Ubuntu
  • Description: Ubuntu 24.04 LTS
  • Release: 24.04
  • Codename: noble

Conclusion


With the latest Easy-RSA 3.x, you no longer need to use source vars.

The settings needed for each operation are either passed directly on the command line or configured as options built into the command itself.

This simplifies the process and allows for more direct configuration.

PKI (Public Key Infrastructure) initialization

A PKI is a system that manages public/private key pairs and issues and manages digital certificates. This enables secure communication and data protection.

./easyrsa init-pki

Creating a CA (Certificate Authority)

A CA is an entity that issues and signs digital certificates. A certificate issued by a trusted CA guarantees the trustworthiness of the party you're communicating with

./easyrsa build-ca nopass

Create a server certificate request


A server certificate request is a data file the server sends to the CA, containing its own public key and some identifying information, to request that a certificate be issued. The CA receives this request and issues a certificate to the server in response.

./easyrsa gen-req server nopass

Sign the request

./easyrsa sign-req server server
Apparently You Don't Need to Source vars in OpenVPN Easy-RSA Anymore | coiai Inc.