summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-11 12:38:00 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-11 12:39:11 +0000
commit2ca50c87df75ce30e135cfcf1c2d056403a61c47 (patch)
tree3f4ab905e74ade22fd8a4f15771bb71c7c40b59e /usr/local/www/wizards
parent69d2ad7733cb590a5910c89d83786272b25552b2 (diff)
downloadpfsense-2ca50c87df75ce30e135cfcf1c2d056403a61c47.zip
pfsense-2ca50c87df75ce30e135cfcf1c2d056403a61c47.tar.gz
Improve wizard by adding more steps and cleaness.
Diffstat (limited to 'usr/local/www/wizards')
-rw-r--r--usr/local/www/wizards/openvpn_wizard.inc335
-rw-r--r--usr/local/www/wizards/openvpn_wizard.xml238
2 files changed, 314 insertions, 259 deletions
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc
index 319b49a..cc9f099 100644
--- a/usr/local/www/wizards/openvpn_wizard.inc
+++ b/usr/local/www/wizards/openvpn_wizard.inc
@@ -1,127 +1,177 @@
<?php
require_once("openvpn.inc");
-function step2_submitphpaction() {
- global $stepid;
+function step1_submitphpaction() {
+ global $stepid, $config;
if ($_POST['authtype'] == "local") {
- $stepid = 2;
+ $config['ovpnserver']['step1']['type'] = "local";
+ write_config();
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=5");
+ exit;
} else if ($_POST['authtype'] == "ldap") {
$stepid = 0;
} else if ($_POST['authtype'] == "radius") {
$stepid = 1;
+ $config['ovpnserver']['step1']['type'] = "radius";
+ unset($config['ovpnserver']['step1']['uselist']);
+ write_config();
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=2");
+ exit;
}
}
-function step3_stepbeforeformdisplay() {
+function step2_stepbeforeformdisplay() {
global $pkg;
$fields =& $pkg['step'][1]['fields']['field'];
+ $count = 0;
$authlist = auth_get_authserver_list();
-
- $fields[2]['options']['option'] = array();
+ $fields[0]['options']['option'] = array();
foreach ($authlist as $i => $auth) {
- if ($auth['type'] != "ldap")
+ if ($auth['type'] != "ldap") {
+ $count++;
continue;
- $opts = array();
- $opts['name'] = $auth['name'];
- $opts['value'] = $auth['name'];
- $fields[2]['options']['option'][] = $opts;
+ }
+ $opts = array();
+ $opts['name'] = $auth['name'];
+ $opts['value'] = $auth['name'];
+ $fields[2]['options']['option'][] = $opts;
}
+ if ($count < 1)
+ $stepid = 2;
+}
+
+function step2_submitphpaction() {
+ global $stepid, $config;
+
+ $config['ovpnserver']['step2']['authserv'] = $_POST['authserv'];
+ unset($config['ovpnserver']['step2']['uselist']);
+ write_config();
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3");
+ exit;
}
function step3_submitphpaction() {
- global $stepid;
- if (!$_POST['uselist'] && empty($_POST['authserv'])) {
- $message = "Please choose an authentication server or create a new one.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=1&message={$message}");
- exit;
- } else if (!$_POST['uselist'] && !empty($_POST['authserv'])) {
- $stepid = 2;
- } else if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) ||
+ if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) ||
empty($_POST['transport']) || empty($_POST['scope']) || empty($_POST['authscope']) || empty($_POST['nameattr'])) {
$message = "Please enter all information for authentication server.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=1&message={$message}");
exit;
}
- $stepid = 2;
+ $_POST['uselist'] = "on";
}
function step4_stepbeforeformdisplay() {
global $pkg;
- $fields =& $pkg['step'][2]['fields']['field'];
+ $fields =& $pkg['step'][3]['fields']['field'];
+ $count = 0;
$authlist = auth_get_authserver_list();
-
- $fields[2]['options']['option'] = array();
- foreach ($authlist as $i => $auth) {
- if ($auth['type'] != "radius")
- continue;
- $opts = array();
- $opts['name'] = $auth['name'];
- $opts['value'] = $auth['name'];
- $fields[2]['options']['option'][] = $opts;
+ $fields[0]['options']['option'] = array();
+ foreach ($authlist as $i => $auth) {
+ if ($auth['type'] != "radius") {
+ $count++;
+ continue;
+ }
+ $opts = array();
+ $opts['name'] = $auth['name'];
+ $opts['value'] = $auth['name'];
+ $fields[2]['options']['option'][] = $opts;
}
+ if ($count < 1)
+ $stepid = 4;
}
function step4_submitphpaction() {
+ global $stepid, $config;
+
+ $config['ovpnserver']['step2']['authserv'] = $_POST['authserv'];
+ unset($config['ovpnserver']['step2']['uselist']);
+ write_config();
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4");
+ exit;
+}
+
+function step5_submitphpaction() {
global $stepid;
- if ($_POST['uselist'] == "yes" && !empty($_POST['authserv'])) {
- $message = "Please choose an authentication server or create a new one.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=2&message={$message}");
- exit;
- } else if (!$_POST['uselist'] && !empty($_POST['authserv'])) {
- $stepid = 2;
- } else if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) ||
+ if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) ||
empty($_POST['passowrd'])) {
$message = "Please enter all information for authentication server.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=2&message={$message}");
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}");
exit;
}
+ $_POST['uselist'] = "on";
}
-function step5_submitphpaction() {
- global $stepid;
+function step6_stepbeforeformdisplay() {
+ global $stepid, $config;
- if ($_POST['uselist'] == "yes" && !empty($_POST['certca'])) {
- $message = "Please choose an certificate authority or create a new one.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3&message={$message}");
+ if (count($config['system']['ca']) < 1) {
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=6");
exit;
- } else if (!$_POST['uselist'] && !empty($_POST['certca'])) {
- $stepid = 3;
- } else if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
- empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) ||
- empty($_POST['organization']) || empty($_POST['email']) || empty($_POST['cn'])) {
+ }
+}
+
+function step6_submitphpaction() {
+ global $config;
+
+ $config['ovpnserver']['step6']['authcertca'] = $_POST['authcertca'];
+ unset($config['ovpnserver']['step6']['uselist']);
+ write_config();
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=7");
+ exit;
+}
+
+function step7_submitphpaction() {
+
+ if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
+ empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) ||
+ empty($_POST['organization']) || empty($_POST['email']) || empty($_POST['cn'])) {
$message = "Please enter all information for the new CA authority.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3&message={$message}");
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=6&message={$message}");
exit;
}
- $stepid = 3;
+ $_POST['uselist'] = "on";
}
-function step6_submitphpaction() {
- global $stepid;
+function step8_stepbeforeformdisplay() {
+ global $stepid, $config;
- if ($_POST['uselist'] == "yes" && !empty($_POST['certname'])) {
- $message = "Please choose an certificate or create a new one.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}");
+ if (count($config['system']['cert']) < 1 ||
+ (count($config['system']['cert']) == 1 && stristr($config['system']['cert'][0]['name'], "webconf"))) {
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=8");
exit;
- } else if (!$_POST['uselist'] && !empty($_POST['certname'])) {
- $stepid = 4;
- } else if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
- empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) ||
- empty($_POST['organization']) || empty($_POST['email']) || empty($_POST['cn'])) {
+ }
+}
+
+function step8_submitphpaction() {
+ global $config;
+
+ $config['ovpnserver']['step9']['authcertname'] = $_POST['authcertname'];
+ unset($config['ovpnserver']['step6']['uselist']);
+ write_config();
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=9");
+ exit;
+}
+
+function step9_submitphpaction() {
+ global $stepid;
+
+ if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
+ empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) ||
+ empty($_POST['organization']) || empty($_POST['email']) || empty($_POST['cn'])) {
$message = "Please enter all information for the new certificate.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}");
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=8&message={$message}");
exit;
}
- $stepid = 4;
+ $_POST['uselist'] = "on";
}
-function step7_stepbeforeformdisplay() {
+function step10_stepbeforeformdisplay() {
global $pkg, $stepid, $netbios_nodetypes;
foreach ($pkg['step'][$stepid]['fields']['field'] as $idx => $field) {
@@ -145,7 +195,7 @@ function step7_stepbeforeformdisplay() {
}
}
-function step7_submitphpaction() {
+function step10_submitphpaction() {
global $savemsg, $stepid;
/* input validation */
@@ -201,7 +251,7 @@ function step7_submitphpaction() {
}
}
-function step9_submitphpaction() {
+function step12_submitphpaction() {
global $config;
$pconfig = $config['ovpnserver'];
@@ -253,57 +303,57 @@ function step9_submitphpaction() {
exit;
}
- if (isset($pconfig['step5']['uselist'])) {
+ if (isset($pconfig['step6']['uselist'])) {
$ca = array();
$ca['refid'] = uniqid();
- $ca['name'] = $pconfig['step5']['certname'];
+ $ca['name'] = $pconfig['step6']['certname'];
$dn = array(
- 'countryName' => $pconfig['step5']['country'],
- 'stateOrProvinceName' => $pconfig['step5']['state'],
- 'localityName' => $pconfig['step5']['city'],
- 'organizationName' => $pconfig['step5']['organization'],
- 'emailAddress' => $pconfig['step5']['email'],
+ 'countryName' => $pconfig['step6']['country'],
+ 'stateOrProvinceName' => $pconfig['step6']['state'],
+ 'localityName' => $pconfig['step6']['city'],
+ 'organizationName' => $pconfig['step6']['organization'],
+ 'emailAddress' => $pconfig['step6']['email'],
'commonName' => $pconfig['step6']['cn']);
- ca_create($ca, $pconfig['step5']['keylength'], $pconfig['step5']['lifetime'], $dn);
+ ca_create($ca, $pconfig['step6']['keylength'], $pconfig['step6']['lifetime'], $dn);
if (!is_array($config['system']['ca']))
$config['system']['ca'] = array();
$config['system']['ca'][] = $ca;
- } else if (!isset($pconfig['step5']['uselist']) && empty($pconfig['step5']['authcertca'])) {
+ } else if (!isset($pconfig['step6']['uselist']) && empty($pconfig['step6']['authcertca'])) {
$message = "Please choose a CA authority.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3&message={$message}");
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=5&message={$message}");
exit;
- } else if (!($ca = lookup_ca($pconfig['step5']['authcertca']))) {
+ } else if (!($ca = lookup_ca($pconfig['step6']['authcertca']))) {
$message = "Not a valid CA authority specified.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3&message={$message}");
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=5&message={$message}");
exit;
}
- if (isset($pconfig['step6']['uselist'])) {
+ if (isset($pconfig['step9']['uselist'])) {
$cert = array();
$cert['refid'] = uniqid();
- $cert['name'] = $pconfig['step6']['certname'];
+ $cert['name'] = $pconfig['step9']['certname'];
$dn = array(
- 'countryName' => $pconfig['step6']['country'],
- 'stateOrProvinceName' => $pconfig['step6']['state'],
- 'localityName' => $pconfig['step6']['city'],
- 'organizationName' => $pconfig['step6']['organization'],
- 'emailAddress' => $pconfig['step6']['email'],
- 'commonName' => $pconfig['step6']['cn']);
-
- cert_create($cert, $ca['refid'], $pconfig['step6']['keylength'], $pconfig['step6']['lifetime'], $dn);
+ 'countryName' => $pconfig['step9']['country'],
+ 'stateOrProvinceName' => $pconfig['step9']['state'],
+ 'localityName' => $pconfig['step9']['city'],
+ 'organizationName' => $pconfig['step9']['organization'],
+ 'emailAddress' => $pconfig['step9']['email'],
+ 'commonName' => $pconfig['step9']['cn']);
+
+ cert_create($cert, $ca['refid'], $pconfig['step9']['keylength'], $pconfig['step9']['lifetime'], $dn);
if (!is_array($config['system']['cert']))
$config['system']['cert'] = array();
$config['system']['cert'][] = $cert;
- } else if (!isset($pconfig['step6']['uselist']) && empty($pconfig['step6']['authcertname'])) {
+ } else if (!isset($pconfig['step6']['uselist']) && empty($pconfig['step9']['authcertname'])) {
$message = "Please choose a Certificate.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}");
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=7&message={$message}");
exit;
- } else if (!($cert = lookup_cert($pconfig['step6']['authcertname']))) {
+ } else if (!($cert = lookup_cert($pconfig['step9']['authcertname']))) {
$message = "Not a valid Certificate specified.";
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}");
+ header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=7&message={$message}");
exit;
}
$server = array();
@@ -324,62 +374,62 @@ function step9_submitphpaction() {
}
$server['caref'] = $ca['refid'];
$server['certref'] = $cert['refid'];
- $server['protocol'] = $pconfig['step7']['protocol'];
- $server['interface'] = $pconfig['step7']['interface'];
- if (isset($pconfig['step7']['localport']))
- $server['localport'] = $pconfig['step7']['localport'];
- $server['description'] = $pconfig['step7']['descr'];
- $server['custom_options'] = $pconfig['step7']['advanced'];
- if (isset($pconfig['step7']['tlsauth'])) {
- if (isset($pconfig['step7']['gentlskey']))
+ $server['protocol'] = $pconfig['step10']['protocol'];
+ $server['interface'] = $pconfig['step10']['interface'];
+ if (isset($pconfig['step10']['localport']))
+ $server['localport'] = $pconfig['step10']['localport'];
+ $server['description'] = $pconfig['step10']['descr'];
+ $server['custom_options'] = $pconfig['step10']['advanced'];
+ if (isset($pconfig['step10']['tlsauth'])) {
+ if (isset($pconfig['step10']['gentlskey']))
$tlskey = openvpn_create_key();
else
- $tlskey = $pconfig['step7']['tlskey'];
+ $tlskey = $pconfig['step10']['tlskey'];
$server['tls'] = base64_encode($tlskey);
}
- $server['dh_length'] = $pconfig['step7']['dhkey'];
- $server['tunnel_network'] = $pconfig['step7']['tunnelnet'];
- if (isset($pconfig['step7']['rdrgw']))
- $server['gwredir'] = $pconfig['step7']['rdrgw'];
- if (isset($pconfig['step7']['localnet']))
- $server['local_network'] = $pconfig['step7']['localnet'];
- if (isset($pconfig['step7']['remotenet']))
- $server['remote_network'] = $pconfig['step7']['remotenet'];
- if (isset($pconfig['step7']['concurrentcon']))
- $server['maxclients'] = $pconfig['step7']['concurrentcon'];
- if (isset($pconfig['step7']['compression']))
- $server['compression'] = $pconfig['step7']['compression'];
- if (isset($pconfig['step7']['tos']))
- $server['passtos'] = $pconfig['step7']['tos'];
- if (isset($pconfig['step7']['interclient']))
- $server['client2client'] = $pconfig['step7']['interclient'];
- if (isset($pconfig['step7']['addrpool']))
- $server['pool_enable'] = $pconfig['step7']['addrpool'];
- if (isset($pconfig['step7']['defaultdomain']))
- $server['dns_domain'] = $pconfig['step7']['defaultdomain'];
- if (isset($pconfig['step7']['dns1']))
- $server['dns_server1'] = $pconfig['step7']['dns1'];
- if (isset($pconfig['step7']['dns2']))
- $server['dns_server2'] = $pconfig['step7']['dns2'];
- if (isset($pconfig['step7']['dns3']))
- $server['dns_server3'] = $pconfig['step7']['dns3'];
- if (isset($pconfig['step7']['dns4']))
- $server['dns_server4'] = $pconfig['step7']['dns4'];
- if (isset($pconfig['step7']['ntp1']))
- $server['ntp_server1'] = $pconfig['step7']['ntp1'];
- if (isset($pconfig['step7']['ntp2']))
- $server['ntp_server2'] = $pconfig['step7']['ntp2'];
- if (isset($pconfig['step7']['wins1']))
- $server['wins_server1'] = $pconfig['step7']['wins1'];
- if (isset($pconfig['step7']['wins2']))
- $server['wins_server2'] = $pconfig['step7']['wins2'];
- if (isset($pconfig['step7']['nbtenable'])) {
- $server['netbios_ntype'] = $pconfig['step7']['nbttype'];
- if (isset($pconfig['step7']['nbtscope']))
- $server['netbios_scope'] = $pconfig['step7']['nbtscope'];
- $server['netbios_enable'] = $pconfig['step7']['nbtenable'];
+ $server['dh_length'] = $pconfig['step10']['dhkey'];
+ $server['tunnel_network'] = $pconfig['step10']['tunnelnet'];
+ if (isset($pconfig['step10']['rdrgw']))
+ $server['gwredir'] = $pconfig['step10']['rdrgw'];
+ if (isset($pconfig['step10']['localnet']))
+ $server['local_network'] = $pconfig['step10']['localnet'];
+ if (isset($pconfig['step10']['remotenet']))
+ $server['remote_network'] = $pconfig['step10']['remotenet'];
+ if (isset($pconfig['step10']['concurrentcon']))
+ $server['maxclients'] = $pconfig['step10']['concurrentcon'];
+ if (isset($pconfig['step10']['compression']))
+ $server['compression'] = $pconfig['step10']['compression'];
+ if (isset($pconfig['step10']['tos']))
+ $server['passtos'] = $pconfig['step10']['tos'];
+ if (isset($pconfig['step10']['interclient']))
+ $server['client2client'] = $pconfig['step10']['interclient'];
+ if (isset($pconfig['step10']['addrpool']))
+ $server['pool_enable'] = $pconfig['step10']['addrpool'];
+ if (isset($pconfig['step10']['defaultdomain']))
+ $server['dns_domain'] = $pconfig['step10']['defaultdomain'];
+ if (isset($pconfig['step10']['dns1']))
+ $server['dns_server1'] = $pconfig['step10']['dns1'];
+ if (isset($pconfig['step10']['dns2']))
+ $server['dns_server2'] = $pconfig['step10']['dns2'];
+ if (isset($pconfig['step10']['dns3']))
+ $server['dns_server3'] = $pconfig['step10']['dns3'];
+ if (isset($pconfig['step10']['dns4']))
+ $server['dns_server4'] = $pconfig['step10']['dns4'];
+ if (isset($pconfig['step10']['ntp1']))
+ $server['ntp_server1'] = $pconfig['step10']['ntp1'];
+ if (isset($pconfig['step10']['ntp2']))
+ $server['ntp_server2'] = $pconfig['step10']['ntp2'];
+ if (isset($pconfig['step10']['wins1']))
+ $server['wins_server1'] = $pconfig['step10']['wins1'];
+ if (isset($pconfig['step10']['wins2']))
+ $server['wins_server2'] = $pconfig['step10']['wins2'];
+ if (isset($pconfig['step10']['nbtenable'])) {
+ $server['netbios_ntype'] = $pconfig['step10']['nbttype'];
+ if (isset($pconfig['step10']['nbtscope']))
+ $server['netbios_scope'] = $pconfig['step10']['nbtscope'];
+ $server['netbios_enable'] = $pconfig['step10']['nbtenable'];
}
- $server['crypto'] = $pconfig['step7']['crypto'];
+ $server['crypto'] = $pconfig['step10']['crypto'];
if (!is_array($config['openvpn']['openvpn-server']))
$config['openvpn']['openvpn-server'] = array();
@@ -391,4 +441,5 @@ function step9_submitphpaction() {
header("Location: vpn_openvpn_server.php");
exit;
}
+
?>
diff --git a/usr/local/www/wizards/openvpn_wizard.xml b/usr/local/www/wizards/openvpn_wizard.xml
index 1030f88..06e250c 100644
--- a/usr/local/www/wizards/openvpn_wizard.xml
+++ b/usr/local/www/wizards/openvpn_wizard.xml
@@ -33,9 +33,9 @@
</copyright>
<totalsteps>8</totalsteps>
<step>
- <title>OpenVPN Server Setup Wizard</title>
<id>1</id>
- <description>Choose type of user authentication you wish to use.</description>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
+ <description>Choose the type of user authentication you wish to use.</description>
<fields>
<field>
<type>select</type>
@@ -63,27 +63,19 @@
<type>submit</type>
</field>
</fields>
- <stepsubmitphpaction>step2_submitphpaction();</stepsubmitphpaction>
+ <stepsubmitphpaction>step1_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
</step>
<step>
<id>2</id>
- <title>Add an authentication server</title>
- <description>Add an LDAP authentication server</description>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
+ <description>Choose an LDAP authentication server</description>
<fields>
<field>
<type>listtopic</type>
<name>Authentication Servers list</name>
</field>
<field>
- <type>checkbox</type>
- <name>uselist</name>
- <enablefields>name,ip,port,transport,scope,authscope,userdn,passdn,nameattr</enablefields>
- <description>Use authentication server from list</description>
- <displayname>Server from list</displayname>
- <bindstofield>ovpnserver->step2->uselist</bindstofield>
- </field>
- <field>
<name>authserv</name>
<displayname>Authentication servers</displayname>
<type>select</type>
@@ -99,9 +91,20 @@
<type>submit</type>
<name>Next</name>
</field>
+ </fields>
+ <stepbeforeformdisplay>step2_stepbeforeformdisplay();</stepbeforeformdisplay>
+ <stepsubmitphpaction>step2_submitphpaction();</stepsubmitphpaction>
+ <javascriptafterformdisplay>enablechange();</javascriptafterformdisplay>
+ <includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
+</step>
+<step>
+ <id>3</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
+ <description>Create an LDAP authentication server</description>
+ <fields>
<field>
<type>listtopic</type>
- <name>Add a new authentication server</name>
+ <name>LDAP authentication server parameters</name>
</field>
<field>
<name>name</name>
@@ -196,23 +199,15 @@
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
</step>
<step>
- <id>3</id>
- <title>Add an RADIUS authentication server</title>
- <description>Add an RADIUS authentication server</description>
+ <id>4</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
+ <description>Choose RADIUS authentication server</description>
<fields>
<field>
<type>listtopic</type>
<name>Authentication Servers list</name>
</field>
<field>
- <type>checkbox</type>
- <name>uselist</name>
- <enablefields>name,ip,port,secret</enablefields>
- <description>Use authentication server from list</description>
- <displayname>Server from list</displayname>
- <bindstofield>ovpnserver->step2->uselist</bindstofield>
- </field>
- <field>
<name>authserv</name>
<displayname>Authentication servers</displayname>
<type>select</type>
@@ -228,6 +223,17 @@
<type>submit</type>
<name>Next</name>
</field>
+ </fields>
+ <stepbeforeformdisplay>step4_stepbeforeformdisplay();</stepbeforeformdisplay>
+ <stepsubmitphpaction>step4_submitphpaction();</stepsubmitphpaction>
+ <javascriptafterformdisplay>enablechange();</javascriptafterformdisplay>
+ <includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
+</step>
+<step>
+ <id>5</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
+ <description>Add an RADIUS authentication server</description>
+ <fields>
<field>
<type>listtopic</type>
<name>Add a new authentication server</name>
@@ -263,34 +269,35 @@
<type>submit</type>
</field>
</fields>
- <stepbeforeformdisplay>step4_stepbeforeformdisplay();</stepbeforeformdisplay>
- <stepsubmitphpaction>step4_submitphpaction();</stepsubmitphpaction>
- <javascriptafterformdisplay>enablechange();</javascriptafterformdisplay>
+ <stepbeforeformdisplay>step5_stepbeforeformdisplay();</stepbeforeformdisplay>
+ <stepsubmitphpaction>step5_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
</step>
<step>
- <id>4</id>
- <title>Select Certificate Authority</title>
- <description>Please choose or create a certificate authority.</description>
+ <id>6</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
+ <description>Select certificate authority.</description>
<fields>
<field>
- <type>checkbox</type>
- <name>uselist</name>
- <enablefields>name,keylength,lifetime,country,state,city,organization,email,cn</enablefields>
- <description>Use authentication server from list</description>
- <displayname>Server from list</displayname>
- <bindstofield>ovpnserver->step5->uselist</bindstofield>
- </field>
- <field>
<type>certca_selection</type>
<name>certca</name>
<displayname>Certificate Authority</displayname>
- <bindstofield>ovpnserver->step5->authcertca</bindstofield>
+ <bindstofield>ovpnserver->step6->authcertca</bindstofield>
</field>
<field>
<name>Next</name>
<type>submit</type>
</field>
+ </fields>
+ <stepbeforeformdisplay>step6_stepbeforeformdisplay();</stepbeforeformdisplay>
+ <stepsubmitphpaction>step6_submitphpaction();</stepsubmitphpaction>
+ <includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
+</step>
+<step>
+ <id>7</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
+ <description>Create a certificate authority.</description>
+ <fields>
<field>
<name>Create a new CA certificate</name>
<type>listtopic</type>
@@ -299,13 +306,13 @@
<name>name</name>
<displayname>Descriptive name</displayname>
<type>input</type>
- <bindstofield>ovpnserver->step5->certca</bindstofield>
+ <bindstofield>ovpnserver->step6->certca</bindstofield>
</field>
<field>
<name>keylength</name>
<displayname>Key length</displayname>
<type>select</type>
- <bindstofield>ovpnserver->step5->keylength</bindstofield>
+ <bindstofield>ovpnserver->step6->keylength</bindstofield>
<options>
<option>
<name>512</name>
@@ -331,82 +338,84 @@
<type>input</type>
<size>10</size>
<description>Lifetime in days</description>
- <bindstofield>ovpnserver->step5->lifetime</bindstofield>
+ <bindstofield>ovpnserver->step6->lifetime</bindstofield>
</field>
<field>
<name>country</name>
<displayname>Country Code</displayname>
<type>input</type>
<size>5</size>
- <bindstofield>ovpnserver->step5->country</bindstofield>
+ <bindstofield>ovpnserver->step6->country</bindstofield>
</field>
<field>
<name>state</name>
<displayname>State or Province</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step5->state</bindstofield>
+ <bindstofield>ovpnserver->step6->state</bindstofield>
</field>
<field>
<name>city</name>
<displayname>City</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step5->city</bindstofield>
+ <bindstofield>ovpnserver->step6->city</bindstofield>
</field>
<field>
<name>organization</name>
<displayname>Organization</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step5->organization</bindstofield>
+ <bindstofield>ovpnserver->step6->organization</bindstofield>
</field>
<field>
<name>email</name>
<displayname>E-mail</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step5->email</bindstofield>
+ <bindstofield>ovpnserver->step6->email</bindstofield>
</field>
<field>
<name>cn</name>
<displayname>Common name</displayname>
<type>input</type>
<size>20</size>
- <bindstofield>ovpnserver->step5->cn</bindstofield>
+ <bindstofield>ovpnserver->step6->cn</bindstofield>
</field>
<field>
<name>Add new CA</name>
<type>submit</type>
</field>
</fields>
- <stepsubmitphpaction>step5_submitphpaction();</stepsubmitphpaction>
+ <stepsubmitphpaction>step7_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
<javascriptafterformdisplay>enablechange();</javascriptafterformdisplay>
</step>
<step>
- <id>5</id>
- <title>Choose Server Certificate</title>
+ <id>8</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
<description>Create a certificate to be used by server.</description>
<fields>
<field>
- <type>checkbox</type>
- <name>uselist</name>
- <enablefields>name,keylength,lifetime,country,state,city,organization,email,cn,ca</enablefields>
- <description>Use authentication server from list</description>
- <displayname>Server from list</displayname>
- <bindstofield>ovpnserver->step6->uselist</bindstofield>
- </field>
- <field>
<type>cert_selection</type>
<name>certname</name>
<displayname>Certificate</displayname>
- <bindstofield>ovpnserver->step6->authcertname</bindstofield>
+ <bindstofield>ovpnserver->step9->authcertname</bindstofield>
</field>
<field>
<name>Next</name>
<type>submit</type>
</field>
+ </fields>
+ <stepbeforeformdisplay>step8_stepbeforeformdisplay();</stepbeforeformdisplay>
+ <stepsubmitphpaction>step8_submitphpaction();</stepsubmitphpaction>
+ <includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
+</step>
+<step>
+ <id>9</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
+ <description>Create a certificate to be used by server.</description>
+ <fields>
<field>
<name>Create a new certificate</name>
<type>listtopic</type>
@@ -415,19 +424,13 @@
<name>name</name>
<displayname>Descriptive name</displayname>
<type>input</type>
- <bindstofield>ovpnserver->step6->certname</bindstofield>
- </field>
- <field>
- <name>ca</name>
- <type>certca_selection</type>
- <displayname>Certificate authority</displayname>
- <bindstofield>ovpnserver->step6->ca</bindstofield>
+ <bindstofield>ovpnserver->step9->certname</bindstofield>
</field>
<field>
<name>keylength</name>
<displayname>Key length</displayname>
<type>select</type>
- <bindstofield>ovpnserver->step6->keylength</bindstofield>
+ <bindstofield>ovpnserver->step9->keylength</bindstofield>
<options>
<option>
<name>512</name>
@@ -453,62 +456,62 @@
<type>input</type>
<size>10</size>
<description>Lifetime in days</description>
- <bindstofield>ovpnserver->step6->lifetime</bindstofield>
+ <bindstofield>ovpnserver->step9->lifetime</bindstofield>
</field>
<field>
<name>country</name>
<displayname>Country Code</displayname>
<type>input</type>
<size>5</size>
- <bindstofield>ovpnserver->step6->country</bindstofield>
+ <bindstofield>ovpnserver->step9->country</bindstofield>
</field>
<field>
<name>state</name>
<displayname>State or Province</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step6->state</bindstofield>
+ <bindstofield>ovpnserver->step9->state</bindstofield>
</field>
<field>
<name>city</name>
<displayname>City</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step6->city</bindstofield>
+ <bindstofield>ovpnserver->step9->city</bindstofield>
</field>
<field>
<name>organization</name>
<displayname>Organization</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step6->organization</bindstofield>
+ <bindstofield>ovpnserver->step9->organization</bindstofield>
</field>
<field>
<name>email</name>
<displayname>E-mail</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step6->email</bindstofield>
+ <bindstofield>ovpnserver->step9->email</bindstofield>
</field>
<field>
<name>cn</name>
<displayname>Common name</displayname>
<type>input</type>
<size>20</size>
- <bindstofield>ovpnserver->step6->cn</bindstofield>
+ <bindstofield>ovpnserver->step9->cn</bindstofield>
</field>
<field>
<name>Create new Certificate</name>
<type>submit</type>
</field>
</fields>
- <stepsubmitphpaction>step6_submitphpaction();</stepsubmitphpaction>
+ <stepsubmitphpaction>step9_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
<javascriptafterformdisplay>enablechange();</javascriptafterformdisplay>
</step>
<step>
- <id>6</id>
- <title>Other needed parameters</title>
+ <id>10</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
<description>On this screen we will configure the Local Area Network information.</description>
<fields>
<field>
@@ -519,12 +522,12 @@
<name>interface</name>
<type>interfaces_selection</type>
<displayname>Interface</displayname>
- <bindstofield>ovpnserver->step7->interface</bindstofield>
+ <bindstofield>ovpnserver->step10->interface</bindstofield>
</field>
<field>
<name>Protocol</name>
<type>select</type>
- <bindstofield>ovpnserver->step7->protocol</bindstofield>
+ <bindstofield>ovpnserver->step10->protocol</bindstofield>
<options>
<option>
<name>UDP</name>
@@ -541,14 +544,14 @@
<displayname>Local port</displayname>
<type>input</type>
<size>10</size>
- <bindstofield>ovpnserver->step7->localport</bindstofield>
+ <bindstofield>ovpnserver->step10->localport</bindstofield>
</field>
<field>
<name>description</name>
<displayname>Description</displayname>
<type>input</type>
<size>30</size>
- <bindstofield>ovpnserver->step7->descr</bindstofield>
+ <bindstofield>ovpnserver->step10->descr</bindstofield>
</field>
<field>
<type>listtopic</type>
@@ -559,7 +562,7 @@
<type>checkbox</type>
<value>on</value>
<description>Enable authentication of TLS packets.</description>
- <bindstofield>ovpnserver->step7->tlsauth</bindstofield>
+ <bindstofield>ovpnserver->step10->tlsauth</bindstofield>
</field>
<field>
<displayname>Automatically generate a TLS key</displayname>
@@ -568,20 +571,20 @@
<value>on</value>
<type>checkbox</type>
<description>Automatically generate a shared TLS authentication key.</description>
- <bindstofield>ovpnserver->step7->gentlskey</bindstofield>
+ <bindstofield>ovpnserver->step10->gentlskey</bindstofield>
</field>
<field>
<name>tlssharedkey</name>
<type>textarea</type>
<cols>30</cols>
<rows>5</rows>
- <bindstofield>ovpnserver->step7->tlskey</bindstofield>
+ <bindstofield>ovpnserver->step10->tlskey</bindstofield>
</field>
<field>
<displayname>DH Parameters Length</displayname>
<name>dhparameters</name>
<type>select</type>
- <bindstofield>ovpnserver->step7->dhkey</bindstofield>
+ <bindstofield>ovpnserver->step10->dhkey</bindstofield>
<options>
<option>
<name>1024</name>
@@ -601,7 +604,7 @@
<name>crypto</name>
<type>select</type>
<displayname>Encryption algorithm</displayname>
- <bindstofield>ovpnserver->step7->crypto</bindstofield>
+ <bindstofield>ovpnserver->step10->crypto</bindstofield>
<options>
<option>
<name>dummy</name>
@@ -618,28 +621,28 @@
<name>tunnelnet</name>
<type>input</type>
<size>20</size>
- <bindstofield>ovpnserver->step7->tunnelnet</bindstofield>
+ <bindstofield>ovpnserver->step10->tunnelnet</bindstofield>
</field>
<field>
<displayname>Redirect Gateway</displayname>
<name>redirectgw</name>
<type>checkbox</type>
<description>Force all client generated traffic through the tunnel.</description>
- <bindstofield>ovpnserver->step7->rdrgw</bindstofield>
+ <bindstofield>ovpnserver->step10->rdrgw</bindstofield>
</field>
<field>
<displayname>Remote network</displayname>
<name>remotenet</name>
<type>input</type>
<size>20</size>
- <bindstofield>ovpnserver->step7->remotenet</bindstofield>
+ <bindstofield>ovpnserver->step10->remotenet</bindstofield>
</field>
<field>
<displayname>Local network</displayname>
<name>localnet</name>
<type>input</type>
<size>20</size>
- <bindstofield>ovpnserver->step7->localnet</bindstofield>
+ <bindstofield>ovpnserver->step10->localnet</bindstofield>
</field>
<field>
<displayname>Concurrent Connections</displayname>
@@ -647,28 +650,28 @@
<description>Specify the maximum number of clients allowed to concurrently connect to this server.</description>
<type>input</type>
<size>10</size>
- <bindstofield>ovpnserver->step7->concurrentcon</bindstofield>
+ <bindstofield>ovpnserver->step10->concurrentcon</bindstofield>
</field>
<field>
<displayname>Compression</displayname>
<name>compression</name>
<type>checkbox</type>
<description>Compress tunnel packets using the LZO algorithm.</description>
- <bindstofield>ovpnserver->step7->compression</bindstofield>
+ <bindstofield>ovpnserver->step10->compression</bindstofield>
</field>
<field>
<displayname>Type-of-Service</displayname>
<name>tos</name>
<type>checkbox</type>
<description>Set the TOS IP header value of tunnel packets to match the encapsulated packet value.</description>
- <bindstofield>ovpnserver->step7->tos</bindstofield>
+ <bindstofield>ovpnserver->step10->tos</bindstofield>
</field>
<field>
<displayname>Inter-client communication</displayname>
<name>interclient</name>
<type>checkbox</type>
<description>Allow communication between clients connected to this server.</description>
- <bindstofield>ovpnserver->step7->interclient</bindstofield>
+ <bindstofield>ovpnserver->step10->interclient</bindstofield>
</field>
<field>
<type>listtopic</type>
@@ -679,50 +682,50 @@
<name>addrpool</name>
<type>checkbox</type>
<description>Provide a virtual adapter IP address to clients (see Tunnel Network).</description>
- <bindstofield>ovpnserver->step7->addrpool</bindstofield>
+ <bindstofield>ovpnserver->step10->addrpool</bindstofield>
</field>
<field>
<displayname>DNS Default Domain</displayname>
<name>defaultdomain</name>
<type>input</type>
<description>Provide a default domain name to clients.</description>
- <bindstofield>ovpnserver->step7->defaultdomain</bindstofield>
+ <bindstofield>ovpnserver->step10->defaultdomain</bindstofield>
</field>
<field>
<displayname>DNS Server 1</displayname>
<name>dnsserver1</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->dns1</bindstofield>
+ <bindstofield>ovpnserver->step10->dns1</bindstofield>
</field>
<field>
<displayname>DNS Server 2</displayname>
<name>dnserver2</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->dns2</bindstofield>
+ <bindstofield>ovpnserver->step10->dns2</bindstofield>
</field>
<field>
<displayname>DNS Server 3</displayname>
<name>dnserver3</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->dns3</bindstofield>
+ <bindstofield>ovpnserver->step10->dns3</bindstofield>
</field>
<field>
<displayname>DNS Server 4</displayname>
<name>dnserver4</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->dns4</bindstofield>
+ <bindstofield>ovpnserver->step10->dns4</bindstofield>
</field>
<field>
<displayname>NTP Server</displayname>
<name>ntpserver1</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->ntp1</bindstofield>
+ <bindstofield>ovpnserver->step10->ntp1</bindstofield>
</field>
<field>
<displayname>NTP Server 2</displayname>
<name>ntpserver2</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->ntp2</bindstofield>
+ <bindstofield>ovpnserver->step10->ntp2</bindstofield>
</field>
<field>
<name>nbtenable</name>
@@ -733,7 +736,7 @@
<displayname>NetBios Node Type</displayname>
<name>nbttype</name>
<type>select</type>
- <bindstofield>ovpnserver->step7->nbttype</bindstofield>
+ <bindstofield>ovpnserver->step10->nbttype</bindstofield>
<options>
<option>
<name>dummy</name>
@@ -745,19 +748,19 @@
<displayname>NetBios Scope</displayname>
<name>nbtscope</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->nbtscope</bindstofield>
+ <bindstofield>ovpnserver->step10->nbtscope</bindstofield>
</field>
<field>
<displayname>WINS Server 1</displayname>
<name>winsserver1</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->wins1</bindstofield>
+ <bindstofield>ovpnserver->step10->wins1</bindstofield>
</field>
<field>
<displayname>WINS Server 2</displayname>
<name>winsserver2</name>
<type>input</type>
- <bindstofield>ovpnserver->step7->wins2</bindstofield>
+ <bindstofield>ovpnserver->step10->wins2</bindstofield>
</field>
<field>
<name>Advanced</name>
@@ -765,20 +768,20 @@
<cols>30</cols>
<rows>5</rows>
<description>Enter any additional options you would like to add to the OpenVPN server configuration here, separated by a semicolon. EXAMPLE: push "route 10.0.0.0 255.255.255.0"</description>
- <bindstofield>ovpnserver->step7->advanced</bindstofield>
+ <bindstofield>ovpnserver->step10->advanced</bindstofield>
</field>
<field>
<name>Next</name>
<type>submit</type>
</field>
</fields>
- <stepbeforeformdisplay>step7_stepbeforeformdisplay();</stepbeforeformdisplay>
- <stepsubmitphpaction>step7_submitphpaction();</stepsubmitphpaction>
+ <stepbeforeformdisplay>step10_stepbeforeformdisplay();</stepbeforeformdisplay>
+ <stepsubmitphpaction>step10_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
</step>
<step>
- <id>7</id>
- <title>Firewall Rules</title>
+ <id>11</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
<fields>
<field>
<type>listtopic</type>
@@ -789,7 +792,7 @@
<displayname>Firewall Rule</displayname>
<description>Automatically add rule to permit</description>
<type>checkbox</type>
- <bindstofield>ovpnserver->step8->ovpnrule</bindstofield>
+ <bindstofield>ovpnserver->step11->ovpnrule</bindstofield>
</field>
<field>
<type>listtopic</type>
@@ -800,7 +803,7 @@
<displayname>OpenVPN rule</displayname>
<description>Add a rule to allow all traffic from connected clients</description>
<type>checkbox</type>
- <bindstofield>ovpnserver->step8->ovpnallow</bindstofield>
+ <bindstofield>ovpnserver->step11->ovpnallow</bindstofield>
</field>
<field>
<name>Next</name>
@@ -809,7 +812,8 @@
</fields>
</step>
<step>
- <id>8</id>
+ <id>12</id>
+ <title>OpenVPN Remote Access Server Setup Wizard</title>
<fields>
<field>
<type>text</type>
@@ -820,7 +824,7 @@
<name>Finish</name>
</field>
</fields>
- <stepsubmitphpaction>step9_submitphpaction();</stepsubmitphpaction>
+ <stepsubmitphpaction>step12_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
</step>
</pfsensewizard>
OpenPOWER on IntegriCloud