[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] Automate building keys, altering config file, and packaging all together


  • Subject: Re: [Openvpn-users] Automate building keys, altering config file, and packaging all together
  • From: Andrew Scherpbier <andrew@xxxxxxxxxxxxx>
  • Date: Sun, 26 Aug 2007 21:36:05 -0700

Hi,
Here's the script that I use to generate keys. It generates a zip file that I then place on a USB thumb drive and physically hand to the person that's going to use it. As you can see from the script, I use a template for the .ovpn file that simply references their uniquely named key file. The instructions for the users are simply: Unzip this file in your openvpn config directory.

#!/bin/bash

if [ -z $1 ]; then
   echo "Please specify the name of the key as the sole argument."
   exit 1
fi

#
# Generate key
#
. ./vars
./pkitool "$1"

#
# create custom .ovpn file for the keys
#
/bin/sed -e "s/@KEYNAME@/$1/g" <blackball-template.ovpn >keys/"$1".ovpn

#
# zip up all the files as a single deliverable.
#
(cd keys; /usr/bin/zip "$1".zip "$1".crt "$1".key ca.crt "$1".ovpn)

echo "Key package in keys/$1.zip"



ournixnation@xxxxxxxxx wrote:
Hello,

Is there anyway that I could automate building keys, altering config files to use the keys created, and then packaging it all together with some additional files and then zipping it up? Or instead of zipping it up, packaging it all into a single exe for Windows users? I have Mac, Linux, and Windows so this could run on any platform. If there is already a way to do this please let me know, otherwise I am willing to pay for a solution.

Thanks!
------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
------------------------------------------------------------------------

_______________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users

begin:vcard
fn:Andrew Scherpbier
n:Scherpbier;Andrew
org:BlackBall, Inc.
adr:Suite 315;;12625 High Bluff Drive;San Diego;CA;92130;USA
email;internet:andrew@xxxxxxxxxxxxx
title:CTO
tel;work:+1 858 523 9944 x217
tel;fax:+1 858 523 9966
tel;cell:+1 858 449 7488
x-mozilla-html:TRUE
url:http://www.blackball.com
version:2.1
end:vcard

_______________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users