From 1ee1666ee45268db405a66b8ec05501c718e7702 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 15 Feb 2017 11:22:27 +0000 Subject: [PATCH] IPsec: Close on-demand tunnels after 15 min of inactivity Signed-off-by: Michael Tremer --- html/cgi-bin/vpnmain.cgi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index b6469c03c2..972c07c13d 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -413,6 +413,12 @@ sub writeipsecfiles { print CONF "\trightsourceip=$lvpnsettings{'RW_NET'}\n"; } else { print CONF "\tauto=$start_action\n"; + + # If in on-demand mode, we terminate the tunnel + # after 15 min of no traffic + if ($start_action eq 'route') { + print CONF "\tinactivity=900\n"; + } } # Fragmentation -- 2.39.2