From 6e8b0ec31045316cae3ed8638b12279870cc7fda Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 8 Nov 2010 17:19:48 -0500 Subject: Add a button to connect a non-mobile IPsec VPN from Status > IPsec. Sends a ping from a local IP in the p2 subnet (if one exists on the router) to the remote p2 subnet. --- usr/local/www/diag_ipsec.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'usr/local/www') diff --git a/usr/local/www/diag_ipsec.php b/usr/local/www/diag_ipsec.php index 9992f5c..e682a5f 100644 --- a/usr/local/www/diag_ipsec.php +++ b/usr/local/www/diag_ipsec.php @@ -51,6 +51,12 @@ require("guiconfig.inc"); include("head.inc"); require("ipsec.inc"); +if ($_GET['act'] == "connect") { + if (is_ipaddr($_GET['remoteid']) && is_ipaddr($_GET['source'])) { + exec("/sbin/ping -S " . escapeshellarg($_GET['source']) . " -c 1 " . escapeshellarg($_GET['remoteid'])); + } +} + if (!is_array($config['ipsec']['phase2'])) $config['ipsec']['phase2'] = array(); @@ -119,6 +125,26 @@ $sad = ipsec_dump_sad(); + + + +
+ + Connect VPN + +
+ +   + +