

There are quite a few fields but you can leave some blankįor some fields there will be a default value, What you are about to enter is what is called a Distinguished Name or a DN. You are about to be asked to enter information that will be incorporated The final command (build-ca) will build the certificate authority (CA) certificate and key by invoking the interactive openssl command: Don't leave any of these parameters blank. Now edit the vars file (called vars.bat on Windows) and set the KEY_COUNTRY, KEY_PROVINCE, KEY_CITY, KEY_ORG, and KEY_EMAIL parameters. Run the following batch file to copy configuration files into place (this will overwrite any preexisting vars.bat and openssl.cnf files): If you are using Windows, open up a Command Prompt window and cd to \Program Files\OpenVPN\easy-rsa.

tar.gz file, the easy-rsa directory will be in the top level directory of the expanded source tree. If you installed OpenVPN from an RPM or DEB file, the easy-rsa directory can usually be found in /usr/share/doc/packages/openvpn or /usr/share/doc/openvpn (it's best to copy this directory to another location such as /etc/openvpn, before any edits, so that future OpenVPN package upgrades won't overwrite your modifications). If you are using Linux, BSD, or a unix-like OS, open a shell and cd to the easy-rsa subdirectory.
MAC VPN SETUP FOR MIKROTIK DOWNLOAD
If you're using OpenVPN 2.3.x, you need to download easy-rsa separately from here. In this section we will generate a master CA certificate/key, a server certificate/key, and certificates/keys for 3 separate clients.įor PKI management, we will use easy-rsa, a set of scripts which is bundled with OpenVPN 2.2.x and earlier. Generate the master Certificate Authority (CA) certificate & key Note that the server and client clocks need to be roughly in sync or certificates might not work properly. The server can enforce client-specific access rights based on embedded certificate fields, such as the Common Name. The CRL allows compromised certificates to be selectively rejected without requiring that the entire PKI be rebuilt. If a private key is compromised, it can be disabled by adding its certificate to a CRL (certificate revocation list).
MAC VPN SETUP FOR MIKROTIK VERIFICATION
And because the server can perform this signature verification without needing access to the CA private key itself, it is possible for the CA key (the most sensitive key in the entire PKI) to reside on a completely different machine, even one without a network connection. The server will only accept clients whose certificates were signed by the master CA certificate (which we will generate below). The server only needs its own certificate/key - it doesn't need to know the individual certificates of every client which might possibly connect to it. This security model has a number of desirable features from the VPN perspective: OpenVPN supports bidirectional authentication based on certificates, meaning that the client must authenticate the server certificate and the server must authenticate the client certificate before mutual trust is established.īoth server and client will authenticate the other by first verifying that the presented certificate was signed by the master certificate authority (CA), and then by testing information in the now-authenticated certificate header, such as the certificate common name or certificate type (client or server). The PKI consists of:Ī separate certificate (also known as a public key) and private key for the server and each client, andĪ master Certificate Authority (CA) certificate and key which is used to sign each of the server and client certificates. The first step in building an OpenVPN 2.x configuration is to establish a PKI (public key infrastructure). Setting up your own Certificate Authority (CA) and generating certificates and keys for an OpenVPN server and multiple clients
