Allow to export separated client config and wrote ovpn_getclient_all.

This commit is contained in:
Robin Schneider
2015-03-13 00:32:40 +01:00
parent 8d8f19d951
commit e6e2221d8b
5 changed files with 103 additions and 10 deletions

View File

@ -13,7 +13,7 @@ The ovpn_genconfig script is intended for simple configurations that apply to th
docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn ovpn_initpki
vim openvpn.conf
docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass
docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn
docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_getclient CLIENTNAME combined > CLIENTNAME.ovpn
* Start the server with:

28
docs/clients.md Normal file
View File

@ -0,0 +1,28 @@
# Advanced client management
## Client configuration mode
The `ovpn_getclient` can produce two different format of configuration.
1. combined: All needed configuration and cryptographic material is in one file (Use "combined-save" to write the configuration file in the same path as the separated parameter does).
2. separated: Separated files.
Some client software might be picky about which configuration format it accepts.
## Batch mode
If you have more than a few clients, you will want to generate and update your client configuration in batch. For this task the script `ovpn_getclient_all` was written, which writes out the configuration for each client to a separate directory called `clients/$cn`.
Execute the following to generate the configuration for all clients:
docker run --rm -t -i -v /tmp/openvpn:/etc/openvpn kylemanna/openvpn ovpn_getclient_all
After doing so, you will find the following files in each of the `$cn` directories:
ca.crt
dh.pem
$cn-combined.ovpn # Combined configuration file format, you your client recognices this file then only this file is needed.
$cn.ovpn # Separated configuration. This configuration file requires the other files ca.crt dh.pem $cn.crt $cn.key ta.key
$cn.crt
$cn.key
ta.key