Windows - Block access when the client looses the connection
Posted: Fri Sep 23, 2011 10:17 am
Hi,
assuming that the openvpn user has local admin rights, is it possible to completely block all internet access when the openvpn client looses it's connection to the vpn server?
This could probably be done with two simple .bat files like:
.opvn config:
up "D:\\Users\\Highend\\scripts\\up.bat"
down "D:\\Users\\Highend\\scripts\\down.bat"
which contain the necessary firewall rules.
My problem is: How can I distinguish a manual (user initiated) disconnect from a --keepalive timeout disconnect?
Manual disconnect shouldn't trigger blocking access (the disconnect is for a reason
but a connectivity loss because of a server failure / shutdown or anything else that isn't under user control should establish the blocking rules.
Any hints how I could accomplish that?
Tia,
highend
assuming that the openvpn user has local admin rights, is it possible to completely block all internet access when the openvpn client looses it's connection to the vpn server?
This could probably be done with two simple .bat files like:
.opvn config:
up "D:\\Users\\Highend\\scripts\\up.bat"
down "D:\\Users\\Highend\\scripts\\down.bat"
which contain the necessary firewall rules.
My problem is: How can I distinguish a manual (user initiated) disconnect from a --keepalive timeout disconnect?
Manual disconnect shouldn't trigger blocking access (the disconnect is for a reason

Any hints how I could accomplish that?
Tia,
highend