Skip to main content
Question

Extension Attribute Global Protect

  • October 28, 2022
  • 2 replies
  • 39 views

MannyKrishna
Forum|alt.badge.img+4

I m trying to find out Global protect VPN Connection status and have to enforce users to get authenticate

2 replies

MannyKrishna
Forum|alt.badge.img+4
  • Author
  • Contributor
  • October 30, 2022

i have tried with below script but even global protect logged in or without login interface has ip address :(

#!/bin/sh
globalProtectTest="/Applications/GlobalProtect.app/Contents/Resources/PanGPS" # GlobalProtect binary

if [ -f "${globalProtectTest}" ] ; then

    # Palo Alto Networks GlobalProtect installed; read current IP Address
    if [ -z "$( ifconfig | grep -E "gpd|utun2" | grep "UP" )" ]; then
        globalProtectStatus="GlobalProtect IP: Inactive"
    else
        globalProtectStatus="GlobalProtect IP: $( ifconfig | grep -A2 -E "gpd|utun2" | grep inet | awk '{ print $2 }' )"
    fi

else

    # Palo Alto Networks GlobalProtect is not installed
    globalProtectStatus="GlobalProtect not installed"

fi

echo "<result>$anyConnectStatus
$globalProtectStatus</result>"

 

exit 0

 

how do i find global protect not logged in user ? How to enforce them to login ?

 


aburrow007
Forum|alt.badge.img+4
  • Jamf Heroes
  • December 21, 2023

i have tried with below script but even global protect logged in or without login interface has ip address :(

#!/bin/sh
globalProtectTest="/Applications/GlobalProtect.app/Contents/Resources/PanGPS" # GlobalProtect binary

if [ -f "${globalProtectTest}" ] ; then

    # Palo Alto Networks GlobalProtect installed; read current IP Address
    if [ -z "$( ifconfig | grep -E "gpd|utun2" | grep "UP" )" ]; then
        globalProtectStatus="GlobalProtect IP: Inactive"
    else
        globalProtectStatus="GlobalProtect IP: $( ifconfig | grep -A2 -E "gpd|utun2" | grep inet | awk '{ print $2 }' )"
    fi

else

    # Palo Alto Networks GlobalProtect is not installed
    globalProtectStatus="GlobalProtect not installed"

fi

echo "<result>$anyConnectStatus
$globalProtectStatus</result>"

 

exit 0

 

how do i find global protect not logged in user ? How to enforce them to login ?

 


Did you find a solution to your issue?  I'm having to do the same here and encountering similar issues.