Time to time my OpenVPN connection hang. I want to disable all internet access automatically after VPN hang (to prevent leakage) until I done some "action" or reconnect to VPN.
OS: Windows 7
I am not sure, but currently I have the idea and I am trying to solve this with two .bat
files. First, that I must run after connect and second one to reestablish my internet connection without OpenVPN.
At the first .bat
I am trying to delete default internet (primary) gateway route delete 0.0.0.0
but the problem is that after disconnection internet works fine and default route automatically reestablish at my route print
Maybe somebody can suggest how to solve this problem? Step-by-step, please.
(sorry for my English, any corrections for my questions are welcome)