kill openvpn_client after n seconds
-
Hello all,
is there any way or option to disconnect an openvpn_client after n seconds no matter if it is idle or not?
thanks. -
Hi,
The VPN client is pfSense ? Running on a PC used to connect to pfSense ?
The criteria "n seconds" could be enforced by VPN+FreeRadius if "n" is not to small, like several minutes.
-
@gertjan hi thanks for reply, both Client and Server are pfSense and i would like to kill Client after 4 hours automatically.
I did this with a simple script file on pfSense 2.3.2 earlier, but after upgrading to 2.4.x it doesn't work somehow.
thats why i was looking for a way maybe in VPN_Configuration to do same Job. -
I'm pretty sure that your script can be adapted for the most recent version.
Can you show the script ?
-
@gertjan
ya it works if I run it manually, but the Problem is if i put in rc.d directory to execute it on startup.
that's another reason i can't edit it because it works without problem if execute it manually.
unfortunately i dont have access to the file now. -
No need to put a file in the "rc.d direcory".
I advise you to use the Shellcmd package :
and/or the Cron package :

-
@gertjan
thanks for the advise, i will test it with one of These packages.
for my Information can you tell me please whats the problem to put a file in rc.d directory? -
@alivdel said in kill openvpn_client after n seconds:
for my Information can you tell me please whats the problem to put a file in rc.d directory?
None

If you know how to write startup (stop) scripts for FreeBSD (pfSense), then it should work just fine.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy