-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if on VPN before download of Software Update #40
Comments
Good feature request! However, this likely won't be implemented until after v3.0 ships. |
I got this working in V3b6 if your interested: Mon Feb 13 15:05:17: Status: Active VPN connection detected! |
Depends... is this specific to one VPN vendor or can it be used generically? |
Unfortunately this does not work with Palo Alto Global Protect 6.x. @tranziq - Which VPN software do you use? |
the checkVPN() function does not work on Ivanti Secure Access Client. Both variables output "0", but a VPN connection is detected at "greater than" zero for either variable. There is nothing vendor-related in the code, so makes me think there is a typo in code, or code is not accurate in detecting VPN status. |
Here is what I use to check for Global Protect VPN being connected. Maybe it will work for others.
|
@smilieK, unfortunately, your code is partially, but not completely, accurate with Ivanti Secure Client. my output:
I thought counting "tun" would work, but that is not accurate as not all VPN solutions use "tun" (some use the ipsec interface, for example). I cheated and asked Apple enterprise support and, according to that engineer, the only way that they found to consistently way is to detect the IP --> IP string.
If VPN exists, then you should receive an output greater than 0. So, try this code and see if it works in your VPN; it reliably detected the Ivanti Secure Client VPN. |
I ran ifconfig | grep -c -e '-->' with Cisco AnyConnect and it returned a value of 1, so it looks like it works for Ciscos VPN |
I get 1 as a result if on or off VPN, until reboot then I get 0 for result until I connect to vpn. :( even after VPN disconnected this is found: thats why I had the ping in my code, to see if the Ping replies or not. if reply VPN connected, if no reply or error then not connected to vpn. |
Downloading software updates while on VPN can be very bandwidth demanding on most corporate infrastructure. We currently have in place a VPN check that we added to Super v2 for consideration to be placed as optional in the Main Code
this confirm works with Forticlient and Cisco Anyconnect in our environment with Super v2
The text was updated successfully, but these errors were encountered: