I have a truenas server on a remote location that i use as a target for the replication tasks of my main truenas server. The remote truenas server connects to my network via its OpenVPN client. The OpenVPN server is installed in my local PFsense firewall.
After a lot of reading and trial/error i finally got this setup working properly and reliably. Or so i thought.
Last night the internet connection failed at the remote location and, as a result, the OpenVPN server stopped receiving the “keepalive” ping signals from the remote truenas server and closed the VPN connection.
The internet service has now been reestablished at the remote location but the truenas server has not tried to reconnect to the OpenVPN server. The only way i found to get the trueNAS to reconnect is to reboot it which means i need to travel to the remote location and physically push the power button. Obviously this is not ideal.
Do you guys have a recommendation on how to get the remote trueNAS server to keep trying to connect to the OpenVPN server indefinitely?
I was thinking that maybe a script would do the trick and run it via a Cron job once every 24 hours or so. But i honestly don’t know how to do tsuch script since i don’t know how to obtain the status of the OpenVPN connection via CLI, or how to start one.
Help?
After a lot of reading and trial/error i finally got this setup working properly and reliably. Or so i thought.
Last night the internet connection failed at the remote location and, as a result, the OpenVPN server stopped receiving the “keepalive” ping signals from the remote truenas server and closed the VPN connection.
The internet service has now been reestablished at the remote location but the truenas server has not tried to reconnect to the OpenVPN server. The only way i found to get the trueNAS to reconnect is to reboot it which means i need to travel to the remote location and physically push the power button. Obviously this is not ideal.
Do you guys have a recommendation on how to get the remote trueNAS server to keep trying to connect to the OpenVPN server indefinitely?
I was thinking that maybe a script would do the trick and run it via a Cron job once every 24 hours or so. But i honestly don’t know how to do tsuch script since i don’t know how to obtain the status of the OpenVPN connection via CLI, or how to start one.
Help?