[Solved] Force a reconnect of a vpn client
I want to force a reconnection of a vpn client at a given time. I could do it for all vpn sessions by setting in a cron the command
killall -HUP openvpn
This will affect all the openvpn sessions, however i want to do it for only one client session. Is there anyway to do this?
/usr/local/sbin/pfSsh.php playback svc restart openvpn client X
Where X is the OpenVPN ID of the connection (e.g. ovpnc2 interface means client ID 2)
Is there any other scheduler except cron which might be killing my vpn?
Here is the long version. I setup a cron rule by directly editing /etc/crontab to restart the vpn client. However, after a router restart the cron rule disappeared from crontab. Strangely, i am still seeing the vpn client being restarted at the same time. I suspect that there might be something else restarting the vpn.
Poking further at the logs it seems the connection is up however pfsense stops routing on the vpn interface. My C2758 supermicro board uses igb drivers. I did not face this issue in 2.2.6, it is only occuring in 2.3
Removed 'ping-restart' and other 'ping-xxx' options from the config and now the vpn client doesnt die.