i am runnning multiple openvpn instances each connected to different servers let's assume there are 3 and i am using a simple php script with this command
system('openvpn config1');
system('openvpn config2');
system('openvpn config3');
the config file conatin daemon and route-nopull ,at the end i'll tun0 tun1 tun2 enabled when i want to use tun0 i use
curl_setopt($curlh, CURLOPT_INTERFACE, "tun0");
now the first problem is if there was some problem with the interface,curl timeout won't work ! it will hang for there forever until i abort it mannually
and the second problem is even openvpn won't kill the interface if the connection failed for some reason,how can i check if the connection is alive all the time (keepalive 10 60 didn't do the trick,i don't know why)
i am not an expert in openvpn,and they don't have a lot of informations in their manual so how can i make sure all the time that the connection on a specific interface is working,and if it is not i wan't to kill that openvpn instance,and what is the solution for the curl timeout when using CURLOPT_INTERFACE