Internet re-connects But VPN does not
Hello,
I'm new to linux.
I am using Centos 6.5. Installed OpenVPN on it. Using services by privateinternetaccess.com.
very often my internet goes down (actually my ISP disconnects when it suspects a VPN). I have created some macros in Autoit software to automatically restart the internet when it goes down (through my windows based laptop which is simultaneously connected to the same internet as my Centos based computer).
But the problem is that even when my internet comes back, my VPN does not connect automatically. It tries to reconnect automatically but it is unable to. I have to manually give the command of 'killall -9 openvpn' in the terminal to first stop the VPN and then start the VPN with this command "openvpn /etc/openvpn/Germany.ovpn &".
How can I automate this process? which detects the internet and if there is no connection then it should automatically process the above commands. Someone was telling me that BASH could help but i dont know how to use Bash. I really need some pointers here.
Much appreciated.
|