diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 8889709663..5bcddc06a6 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 6e850463ae..07f8c8bca5 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'];
@@ -887,6 +894,13 @@ function dpdchkbox_change() {
=gettext("Whether rekeying of an IKE_SA should also reauthenticate the peer. In IKEv1, reauthentication is always done."); ?>
+