I need a kill-switch script windows 7

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
3wix-blabla88
OpenVpn Newbie
Posts: 1
Joined: Sun May 27, 2018 4:35 pm

I need a kill-switch script windows 7

Post by 3wix-blabla88 » Sun May 27, 2018 4:46 pm

I crossed the entire Internet even a clever Google could not help me.
Variants of what it offers is to use a system firewall.
But this decision does not suit me.

My idea is to use the adapter to disconnect using the route.
Delete the default gateway route delete 0.0.0.0

when there was a break with OpenVPN and then after a while to add the system gateway again route 0.0.0.0 mask 0.0.0.0

What offer is there?
can there be scripts or additional plug-ins?

User avatar
whoami
OpenVpn Newbie
Posts: 2
Joined: Sun Oct 07, 2018 5:20 pm

Re: I need a kill-switch script windows 7

Post by whoami » Sun Oct 07, 2018 5:26 pm

Here's link to my GitHub with an interactive kill switch batch file I wrote, If you only wanting the routing just pull it out of the .bat with a txt editor. Your going to want to make a static route to the VPN server before you delete the default like I did in my script. Other wise you won't be able to reconnect to the server if the connection drops.

https://github.com/cmdwhoami/whoami_vpn_killswitch.bat

Post Reply