[13/16] IPsec: Ensure that iOS VPNs are always connected

Message ID 20200528175850.12638-14-michael.tremer@ipfire.org
State New
Headers show
Series
  • [01/16] IPsec: Use sane defaults for certificate lifetimes
Related show

Commit Message

Michael Tremer May 28, 2020, 5:58 p.m. UTC
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 html/cgi-bin/vpnmain.cgi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch

diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
index 9353a2f0d..1e4115e95 100644
--- a/html/cgi-bin/vpnmain.cgi
+++ b/html/cgi-bin/vpnmain.cgi
@@ -1421,6 +1421,18 @@  END
 	print "					<string>$confighash{$key}[1]</string>\n";
 	print "					<key>AuthPassword</key>\n";
 	print "					<string></string>\n";
+
+	# Connect the VPN automatically
+	print "					<key>OnDemandEnabled</key>\n";
+	print "					<integer>1</integer>\n";
+	print "					<key>OnDemandRules</key>\n";
+	print "					<array>\n";
+	print "						<dict>\n";
+	print "							<key>Action</key>\n";
+	print "							<string>Connect</string>\n";
+	print "						</dict>\n";
+	print "					</array>\n";
+
 	print "				</dict>\n";
 	print "			</dict>\n";