short version for the hasty reader:
What would be the right option to specify a script that OpenVPN should run when the VPN was detected to have timed out or be otherwise unavailable? --down [cmd] does not work for timeouts.
Longer explanation of the background:
I have a server ("HomeServer") that routes certain traffic (i.e. specific ports, e.g. outgoing mail) through a VPN (to another server of mine ("RemoteServer), which then routes it to the Internet, so that the HomeServer uses the RemoteServer's IP for certain traffic), while the rest of the traffic goes to my ISP. That works. (Yay!)
Unfortunately, the VPN at times has timeouts. In order to be able to continue sending traffic to the world, I have configured on the OPVN-client (HomeServer):
Code: Select all
script-security 2
up "/usr/local/bin/VPN_routing on"
down "/usr/local/bin/VPN_routing off"
I found the up-restart option in the manual, which might help for the up part (would it?). But I could not find a down-restart option (which would be as important to ensure that traffic goes through my regular ISP altogether when the VPN is down.
How can I have OpenVPN run a script when there is a timeout of the VPN is otherwise detected by OpenVPN not to be working?
Thanks!