IPsec: Close on-demand tunnels after 15 min of inactivity

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2017-02-15 11:22:27 +00:00
parent dcb406cc67
commit 1ee1666ee4

View File

@@ -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