mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add a checkbox for duplicate-cn on OpenVPN servers.
This commit is contained in:
parent
09e11b6947
commit
bca35cff46
@ -431,6 +431,8 @@ function openvpn_reconfigure($mode,& $settings) {
|
||||
$conf .= "client-to-client\n";
|
||||
break;
|
||||
}
|
||||
if (isset($settings['duplicate_cn']))
|
||||
$conf .= "duplicate-cn\n";
|
||||
}
|
||||
|
||||
// client specific settings
|
||||
|
||||
@ -176,6 +176,8 @@ if($_GET['act']=="edit"){
|
||||
// just in case the modes switch
|
||||
$pconfig['autokey_enable'] = "yes";
|
||||
$pconfig['autotls_enable'] = "yes";
|
||||
|
||||
$pconfig['duplicate_cn'] = isset($a_server[$id]['duplicate_cn']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -364,7 +366,10 @@ if ($_POST) {
|
||||
if ($pconfig['dns_server_enable'])
|
||||
$server['nbdd_server1'] = $pconfig['nbdd_server1'];
|
||||
}
|
||||
|
||||
|
||||
if ($_POST['duplicate_cn'] == "yes")
|
||||
$server['duplicate_cn'] = true;
|
||||
|
||||
if (isset($id) && $a_server[$id])
|
||||
$a_server[$id] = $server;
|
||||
else
|
||||
@ -1012,6 +1017,24 @@ if ($savemsg)
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="duplicate_cn">
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Duplicate Connections"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<table border="0" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<?php set_checked($pconfig['duplicate_cn'],$chk); ?>
|
||||
<input name="duplicate_cn" type="checkbox" value="yes" <?=$chk;?>/>
|
||||
</td>
|
||||
<td>
|
||||
<span class="vexpl">
|
||||
<?=gettext("Allow multiple concurrent connections from clients using the same Common Name.<br/>NOTE: This is not generally recommended, but may be needed for some scenarios."); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="6" cellspacing="0" id="client_opts">
|
||||
|
||||
@ -550,6 +550,8 @@ function step12_submitphpaction() {
|
||||
$server['passtos'] = $pconfig['step10']['tos'];
|
||||
if (isset($pconfig['step10']['interclient']))
|
||||
$server['client2client'] = $pconfig['step10']['interclient'];
|
||||
if (isset($pconfig['step10']['duplicate_cn']))
|
||||
$server['duplicate_cn'] = $pconfig['step10']['duplicate_cn'];
|
||||
if (isset($pconfig['step10']['dynip']))
|
||||
$server['dynamic_ip'] = $pconfig['step10']['dynip'];
|
||||
if (isset($pconfig['step10']['addrpool']))
|
||||
|
||||
@ -747,6 +747,13 @@
|
||||
<description>Allow communication between clients connected to this server.</description>
|
||||
<bindstofield>ovpnserver->step10->interclient</bindstofield>
|
||||
</field>
|
||||
<field>
|
||||
<displayname>Duplicate Connections</displayname>
|
||||
<name>duplicate_cn</name>
|
||||
<type>checkbox</type>
|
||||
<description>Allow multiple concurrent connections from clients using the same Common Name.<br/>NOTE: This is not generally recommended, but may be needed for some scenarios.</description>
|
||||
<bindstofield>ovpnserver->step10->duplicate_cn</bindstofield>
|
||||
</field>
|
||||
<field>
|
||||
<type>listtopic</type>
|
||||
<name>Client Settings</name>
|
||||
@ -943,3 +950,4 @@
|
||||
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
|
||||
</step>
|
||||
</pfsensewizard>
|
||||
| ||||