OpenVPN on Laptop and automatically connect/disconnect
Posted: Tue Sep 07, 2010 11:21 am
Hi,
I run OpenVPN client on my laptop. My OpenVPN server is integrated with home LAN and it works in a ethernet bridge mode using a tap device. No ip configuration is provided by the vpn infrastructure. Instead the DHCP server in home LAN is always used both for normal and virtual connection. Thus my laptop is always given the same ip independently if I am home or not.
The problem is that I want the OpenVPN client works as Windows service and automatically connect to my OpenVPN server only when I am not at home. The problem is more complex because I don't switch off my laptop but I hardly always hibernate it. Therefore OpenVPN client service should watch on phisical ethernet devices (note: both wire and wireless) and make decision to connect or disconnect vpn client depending on what ip is given to the phisical ethernet device. If the ip belongs to my home LAN then vpn client automatically disconnects, if not then vpn client automatically connects.
I've digged in the Internet but without a success.
Very thanks for any help.
The problem seems to be a general problem for laptop/notebook vpn client service.
I run OpenVPN client on my laptop. My OpenVPN server is integrated with home LAN and it works in a ethernet bridge mode using a tap device. No ip configuration is provided by the vpn infrastructure. Instead the DHCP server in home LAN is always used both for normal and virtual connection. Thus my laptop is always given the same ip independently if I am home or not.
The problem is that I want the OpenVPN client works as Windows service and automatically connect to my OpenVPN server only when I am not at home. The problem is more complex because I don't switch off my laptop but I hardly always hibernate it. Therefore OpenVPN client service should watch on phisical ethernet devices (note: both wire and wireless) and make decision to connect or disconnect vpn client depending on what ip is given to the phisical ethernet device. If the ip belongs to my home LAN then vpn client automatically disconnects, if not then vpn client automatically connects.
I've digged in the Internet but without a success.
Very thanks for any help.
The problem seems to be a general problem for laptop/notebook vpn client service.