Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103400

Re: Testing whether the VPN is running?

From Gisle Vanem <gvanem@yahoo.no>
Newsgroups comp.lang.python
Subject Re: Testing whether the VPN is running?
Date 2016-02-23 10:40 +0100
Message-ID <mailman.65.1456220556.20994.python-list@python.org> (permalink)
References <8ghgpcxrd3.ln2@news.ducksburg.com> <20160223082445.GA73615@cskk.homeip.net>

Show all headers | View raw


Cameron Simpson:

> You might also want to check that the interface is up.
> 
> My personal hack (not for a VPN, but for "being online", which turns my ssh tunnels on and off) is to look in the output
> of "netstat -rn" for a default route. This may imply that an alternative test for you is to test for a route to your
> VPN's address range?  Just an idea.

And for VPN in Windows *and* using WinPcap, one can check if this device
exist:
  \Device\NPF_GenericDialupAdapter

(controllable using 'sq query rasdial'). This works if you use
PPTP or L2TP but not OpenVPN.

BTW, a VPN on Windows doesn't come back up automatically after
a sleep/hibernation. The WOSB tool at http://www.dennisbabkin.com/wosb/
could be handy. What happens with your VPN on Linux (?) after coming
back from sleep/hibernation? Automatic or you need to script that too?

-- 
--gv

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Testing whether the VPN is running? Adam Funk <a24061@ducksburg.com> - 2016-02-18 09:26 +0000
  Re: Testing whether the VPN is running? Ervin Hegedüs <airween@gmail.com> - 2016-02-18 10:45 +0100
    Re: Testing whether the VPN is running? Adam Funk <a24061@ducksburg.com> - 2016-02-18 10:03 +0000
      Re: Testing whether the VPN is running? Cameron Simpson <cs@zip.com.au> - 2016-02-23 19:24 +1100
        Re: Testing whether the VPN is running? Adam Funk <a24061@ducksburg.com> - 2016-02-25 13:25 +0000
      Re: Testing whether the VPN is running? Gisle Vanem <gvanem@yahoo.no> - 2016-02-23 10:40 +0100
  Re: Testing whether the VPN is running? Dan Stromberg <drsalists@gmail.com> - 2016-02-25 15:01 -0800

csiph-web