summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorlgcosta <lgcosta@pfsense.org>2011-03-21 15:56:43 -0300
committerlgcosta <lgcosta@pfsense.org>2011-03-21 15:58:43 -0300
commitbf87b4d7d1e9c0064e59727afd7601c111f6f3da (patch)
tree720113787285c71bc19ae2be9171b580325be107 /usr
parent375828d911b37e0e63a5e2530f8e8d88ee79e8e1 (diff)
downloadpfsense-bf87b4d7d1e9c0064e59727afd7601c111f6f3da.zip
pfsense-bf87b4d7d1e9c0064e59727afd7601c111f6f3da.tar.gz
Added option to select the type of device for use in the tunnel openvpn
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/vpn_openvpn_server.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index 0f751e7..f15a9ae 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -91,6 +91,7 @@ if($_GET['act']=="new"){
$pconfig['tlsauth_enable'] = "yes";
$pconfig['autotls_enable'] = "yes";
$pconfig['dh_length'] = 1024;
+ $pconfig['device_mode'] = "tun";
$pconfig['interface'] = "wan";
$pconfig['local_port'] = openvpn_port_next('UDP');
$pconfig['pool_enable'] = "yes";
@@ -104,6 +105,7 @@ if($_GET['act']=="edit"){
$pconfig['mode'] = $a_server[$id]['mode'];
$pconfig['protocol'] = $a_server[$id]['protocol'];
$pconfig['authmode'] = $a_server[$id]['authmode'];
+ $pconfig['device_mode'] = $a_server[$id]['device_mode'];
$pconfig['interface'] = $a_server[$id]['interface'];
if (!empty($a_server[$id]['ipaddr'])) {
$pconfig['interface'] = $pconfig['interface'] . '|' . $a_server[$id]['ipaddr'];
@@ -304,6 +306,7 @@ if ($_POST) {
if (!empty($pconfig['authmode']))
$server['authmode'] = implode(",", $pconfig['authmode']);
$server['protocol'] = $pconfig['protocol'];
+ $server['device_mode'] = $pconfig['device_mode'];
list($server['interface'], $server['ipaddr']) = explode ("|",$pconfig['interface']);
$server['local_port'] = $pconfig['local_port'];
$server['description'] = $pconfig['description'];
@@ -663,6 +666,21 @@ if ($savemsg)
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Device Mode"); ?></td>
+ <td width="78%" class="vtable">
+ <select name="device_mode" class="formselect">
+ <?php
+ foreach ($openvpn_dev_mode as $device):
+ $selected = "";
+ if ($pconfig['device_mode'] == $device)
+ $selected = "selected";
+ ?>
+ <option value="<?=$device;?>" <?=$selected;?>><?=$device;?></option>
+ <?php endforeach; ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
OpenPOWER on IntegriCloud