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.