diff options
-rw-r--r-- | etc/inc/openvpn.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 55fe2fc..99d25f6 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -301,6 +301,7 @@ function openvpn_server_create_cert($mode, $id) { return; global $g, $config; $settings = $config['installedpackages']["openvpn$mode"]['config'][$id]; + $serveruniq = $settings['interface'] . $settings['local_port'] . $settings['protocol']; log_error("Creating server certificate for {$settings['description']}."); $caname = $settings['cipherpki']; foreach($config['openvpn']['keys'] as $ca) { @@ -314,7 +315,7 @@ function openvpn_server_create_cert($mode, $id) { fwrite($fd, "#!/bin/tcsh\n"); fwrite($fd, "cd $ovpncapath \n"); fwrite($fd, "source $ovpncapath/$caname/vars \n"); - fwrite($fd, "$easyrsapath/pkitool --batch --server {$caname} \n"); + fwrite($fd, "$easyrsapath/pkitool --batch --server {$serveruniq} \n"); fwrite($fd, "openssl dhparam -out $ovpncapath/$caname/dh_params.dh $cakeysize \n"); fclose($fd); system("/bin/chmod a+rx $ovpncapath/RUNME_2ND"); |