Skip to content

a simple php script that autogenerates keys and configuration for openvpn networks

Notifications You must be signed in to change notification settings

danielzzz/php-ca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-CA

This script makes creation of new openvpn users easier.
It autogenerates keys and configuration files.

It creates a directory with all keys and config files and a tar.gz file for easy copying to your client machine.

The files generated by this script are:
$commonName.key - user's private key
$commonName.crt - user's certificate signed by the server
$networkName.conf - configuration file for openvpn
$networkName.crt - server's certificate file

CONFIGURATION:
edit php-ca.php file especially set variables:
$commonName - this is the common name of you new user
$networkName - the openvpn config file will be generated with this name
$openVPNServer - the server that hosts your openvnp network
$openVPNPort - the port used by openvpn
$serverCertPath - the path of the ca.crt file
$serverKeyPath - the path of the ca.key file
$outputDir - the directory where generated files will be stored

make sure you have writting permissions in the directory where the script is executed.

USAGE:
php php-ca.php

once the files are created you can copy them to your openvpn directory and then restart openvpn

if you want to use it vía http it would be probably a good idea to add some password so not everybody can connect to your vpn...

About

a simple php script that autogenerates keys and configuration for openvpn networks

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages