0

I couldn't find anything on Google, everything that I found was related to the opposite problem, VPN disconnecting when people don't want it to.

A little backstory: one of our potential clients needs us to have forced VPN disconnect after 24 hours of continuous connection.

We're using Libreswan and xl2tpd. If it's possible, please point me also to the resources so I can implement it. Thanks.

  • sorry for the stupid question - why not implement a cron-job, which executes once a day a restart of the daemon? wouldn't that suffice for the 24h-forced disconnect ? – Martin Mar 08 '21 at 11:33
  • @Martin That's actually my intended workaround if I can't come up with a less stupid solution. – Rikudou_Sennin Mar 09 '21 at 12:03

1 Answers1

0

Have you tried playing with the 2 IPSec phases' SA lifetime settings ? Paradoxically, you could achieve your target by intentionally mis-configuring them between client and server. You could set them to testing low value of a few minutes and play with the config so that it possibly doesn't get automatically reconnected once the lifetime expires.

develox
  • 41
  • 4
  • I couldn't find the correct settings, the clients always reconnects automatically, I need it to force them to reconnect manually. – Rikudou_Sennin Mar 09 '21 at 12:05