User Manual

Table Of Contents
Chapter 9. Advanced Use Cases for Access Server
The build-ca builds the certificate authority (CA) certificate and key by invoking the interactive
openssl command:
ai:easy-rsa # ./build-ca
Generating a 1024 bit RSA private key
............++++++
...........++++++
writing new private key to ’ca.key’
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ’.’, the field will be left blank.
-----
Country Name (2 letter code) [FI]:
State or Province Name (full name) [NA]:
Locality Name (eg, city) [ESPOO]:
Organization Name (eg, company) [OpenVPN-TEST]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server’s hostname) []:OpenVPN-CA
Email Address [me@myhost.mydomain]:
Note: In the above sequence, the most queried parameters were defaulted to the values set in the
vars or vars.bat files. The only parameter which must be explicitly entered is the Common Name. In
the example above, we have used "OpenVPN-CA".
Next, we will generate a certificate and private key for the server:
build-key-server server
As in the previous step, most parameters can be defaulted. When the Common Name is queried,
enter "server". Two other queries require positive responses, "Sign the certificate? [y/n]" and "1
out of 1 certificate requests certified, commit? [y/n]".
Generating client certificates is very similar to the previous step:
build-key client
If you want to use many clients, then you could use, for example, the following commands:
build-key client1
build-key client2
build-key client3
In this case, remember that for each client, make sure to type the appropriate Common Name
when prompted, i.e. "client1", "client2", or "client3". Always use a unique common name for
each client.
Next we’ll create Diffie Hellman parameters that must be generated for the OpenVPN server:
122