requesting connection status via code or through CLI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

requesting connection status via code or through CLI

L0 Member

Hey there, I'm designing windows 10 app which needs to connect to a office based database via a remote laptop.

The laptop will have access to the office through the GlobalProtect VPN.

I need a way to query the GlobalProtect windows agent to see if there is an active VPN connection so I can start making database calls or use locally stored data.

Any ideas.

 

Currently I can either ping the officer server which will pause the app while it times out, or read through the Global Protect logs.

I am hoping I can make a quick call to the installed client.

 

Cheers

Aaron

1 accepted solution

Accepted Solutions

what about checking the network adapters? when Global protect isn't connected the network adapter will show also a disconnected status. One possible powershell command is:

 

get-netadapter

This will show all network adapters and their connection status and where you get a nice list of up and disconnected adapters. The Global Protect network adapters description is normally "PANGP Virtual Ethernet Adapter".

 

View solution in original post

4 REPLIES 4

L4 Transporter

What if you inspect the routing table?

It may take some tweaking to the GP configuration, but you should be able to have it install a route to the network or server that you can look for in the routing table.

Hi Joe, 

 

Not as eligent as I was hoping, but certainly a much better step up then running through logs.  I'll most likely run with this solution for now until something better comes along.

 

Cheers

Aaron

There may be a better solution that I do not know of, just offering something I thought was better than pinging the host or searching the logs

what about checking the network adapters? when Global protect isn't connected the network adapter will show also a disconnected status. One possible powershell command is:

 

get-netadapter

This will show all network adapters and their connection status and where you get a nice list of up and disconnected adapters. The Global Protect network adapters description is normally "PANGP Virtual Ethernet Adapter".

 

  • 1 accepted solution
  • 2753 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!