summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/vpn.inc3
-rw-r--r--usr/local/www/vpn_ipsec_phase1.php14
2 files changed, 17 insertions, 0 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 8889709..5bcddc0 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -597,6 +597,9 @@ EOD;
$right_spec = "%any";
$passive = 'add';
} else {
+ if (isset($ph1ent['responderonly']))
+ $passive = 'add';
+
$right_spec = $ph1ent['remote-gateway'];
if (is_ipaddr($right_spec))
$sourcehost = $right_spec;
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php
index 6e85046..07f8c8b 100644
--- a/usr/local/www/vpn_ipsec_phase1.php
+++ b/usr/local/www/vpn_ipsec_phase1.php
@@ -113,6 +113,8 @@ if (isset($p1index) && $a_phase1[$p1index]) {
$pconfig['reauth_enable'] = true;
if (isset($a_phase1[$p1index]['rekey_enable']))
$pconfig['rekey_enable'] = true;
+ if (isset($a_phase1[$p1index]['responderonly']))
+ $pconfig['responderonly'] = true;
if ($a_phase1[$p1index]['dpd_delay'] && $a_phase1[$p1index]['dpd_maxfail']) {
$pconfig['dpd_enable'] = true;
@@ -383,6 +385,11 @@ if ($_POST) {
else
unset($ph1ent['rekey_enable']);
+ if (isset($pconfig['responderonly']))
+ $ph1ent['responderonly'] = true;
+ else
+ unset($ph1ent['responderonly']);
+
if (isset($pconfig['dpd_enable'])) {
$ph1ent['dpd_delay'] = $pconfig['dpd_delay'];
$ph1ent['dpd_maxfail'] = $pconfig['dpd_maxfail'];
@@ -888,6 +895,13 @@ function dpdchkbox_change() {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Only repsonder");?></td>
+ <td width="78%" class="vtable">
+ <input name="responderonly" type="checkbox" id="responderonly" value="yes" <?php if (isset($pconfig['responderonly'])) echo "checked=\"checked\""; ?> />
+ <?=gettext("Whether a connection should be passive on a connection and just wait connectivity from the other peer.."); ?><br />
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("NAT Traversal"); ?></td>
<td width="78%" class="vtable">
<select name="nat_traversal" class="formselect">
OpenPOWER on IntegriCloud