Skip to content

Instantly share code, notes, and snippets.

@slyness
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slyness/c9d25c742b140e073473 to your computer and use it in GitHub Desktop.
Save slyness/c9d25c742b140e073473 to your computer and use it in GitHub Desktop.
sudo su -

cd /etc/openvpn/easy-rsa

source ./vars

./pkitool USER

This generates the goods in /etc/openvpn/keys

gather the files which need to be distributed

cd /root (or /tmp or where ever)

mkdir USER

cd USER

cp /etc/openvpn/keys/ca.crt .
cp /etc/openvpn/keys/USER.* .
cp /etc/openvpn/keys/SOMEOTHERUSERS.ovpn USER.ovpn

vi USER.ovpn (update username for cert and key entries)

The directory should now contain the following files.

ca.crt
USER.crt
USER.csr
USER.key
USER.ovpn

create archive

(`pwd` = /root/USER)

tar -czvf USER.tar.gz *

The user needs the archive and don't for get to clean up the files afterward in your temporary location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment