Re: Reopen VPN on connection status changes?



On Mon, 2009-09-21 at 17:06 +0300, Johan Kiviniemi wrote:
> Hi,
> 
> I use OpenVPN with NetworkManager, with the VPN connection being the
> default route.
> 
> Whenever connection status changes in such a way that NetworkManager
> would change the default route when no VPN is used – e.g. a mobile
> connection was active, but a WLAN or Ethernet interface became active
> – I’d like NetworkManager to reopen the VPN connection, so that it
> would use the better network route.
> 
> When the better network connection disappears (and the VPN was using
> that connection), but there’s still an alternative connection,
> currently OpenVPN just dies. I’d like NetworkManager to restart it in
> that case as well.
> 
> In fact, I’d like NetworkManager to try to keep the VPN connection
> active no matter what. If OpenVPN dies for any reason – network
> problems, server problems, no active network connections temporarily
> etc. – NetworkManager should try to restart it.

Yep, autoreconnect to VPN is a pending feature but we haven't had time
to work on it yet.  If you google around, you'll find a script that
Tambet wrote that you can use in the mean time to keep a VPN connection
up automatically:

http://markmail.org/message/nmpy4ixmasw6v3ue

> Is there a way to do that already, or should I file a bug report?
> Thanks for the help!

There are already bugs for the VPN reconnect stuff, so don't bother.  If
anyone is willing to help out with the VPN reconnect stuff, I'm happy to
share ideas on how to do it.  Just don't have time to do the whole thing
myself this month or so.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]