vpn kill switch in firewall

so i have vpn configured, but sometimes for unknown reason, either my vpn disconnects or the route in ip/routes just disables itself (this happens more often)

i have a certain range mangled to connect to vpn/ is there a line i can add so if ppp vpn connection gets disconnected or ip/route gets disabled, the mangled ip range automatically gets disconnected?

thanks :slight_smile:

Two basic ways how to solve it:

a) Somehow detect disconnected VPN (netwatch, script, …) and disable what you want when it happens.

b) Add firewall rules to only allow some traffic to go out via VPN interface. When VPN goes down, if will try to go via default route and will be blocked.

I prefer b).

What if the kill switch did not work lets suppose it is blocked by firewall then what should I do to access VPN? how to disable firewall in windows?

Guys, Sob gave a clear answer how to solve it. Why ask it again?