Created
December 9, 2013 15:16
-
-
Save flickerfly/7873733 to your computer and use it in GitHub Desktop.
Create a new user and assemble the required files to setup the VPN connection on the client side. First argument on the command line is the username.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
user=$1 | |
vpnconf="/etc/openvpn" | |
rsa="$vpnconf/easy-rsa" | |
cd $rsa | |
source vars | |
./build-key $user | |
mkdir ~/$user.vpnfiles | |
cp $vpnconf/ca.crt ~/$user.vpnfiles/ | |
cp $vpnconf/client.conf ~/$user.vpnfiles/Org_Name.ovpn | |
cp $rsa/keys/$user.crt ~/$user.vpnfiles/ | |
cp $rsa/keys/$user.key ~/$user.vpnfiles/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment