<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic forcefully logout all GP users from gateways in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/320910#M82143</link>
    <description>&lt;P&gt;Hi Anyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to logout all GP VPN users forcefully logout from the gateway either doesn't logout users or no errors throwing on command as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;request global-protect-gateway client-logout gateway gp-gateway reason force-logout user * computer *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Login &amp;amp; logout time is same before and after execute this commands. Please let me know, have any one tried this way or share the correct commands.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Karup&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2020 11:06:18 GMT</pubDate>
    <dc:creator>Karup</dc:creator>
    <dc:date>2020-04-06T11:06:18Z</dc:date>
    <item>
      <title>forcefully logout all GP users from gateways</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/320910#M82143</link>
      <description>&lt;P&gt;Hi Anyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to logout all GP VPN users forcefully logout from the gateway either doesn't logout users or no errors throwing on command as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;request global-protect-gateway client-logout gateway gp-gateway reason force-logout user * computer *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Login &amp;amp; logout time is same before and after execute this commands. Please let me know, have any one tried this way or share the correct commands.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Karup&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 11:06:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/320910#M82143</guid>
      <dc:creator>Karup</dc:creator>
      <dc:date>2020-04-06T11:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: forcefully logout all GP users from gateways</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/320937#M82150</link>
      <description>&lt;P&gt;Hi &lt;A href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/105984" target="_blank"&gt;@Karup&lt;/A&gt; ,&lt;/P&gt;
&lt;DIV id="bodyDisplay_0" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I can see only portal users can be logged out all at once.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt; request global-protect-portal client-logout portal &amp;lt;value&amp;gt; reason force-logout filter-user all-users&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This seems like a missing feature on the gateway to disconnect all users at once.&amp;nbsp; You can do it for one user on the CLI or from the UI Network&amp;gt;GlobalProtect&amp;gt;Gateways&amp;gt; &amp;lt;value&amp;gt; &amp;gt;Remote Users&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to raise a feature request with your local SE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;-Kiwi.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="ConnectiveDocSignExtentionInstalled" data-extension-version="1.0.4"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Apr 2020 11:56:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/320937#M82150</guid>
      <dc:creator>kiwi</dc:creator>
      <dc:date>2020-04-06T11:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: forcefully logout all GP users from gateways</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/320943#M82154</link>
      <description>&lt;P&gt;Thanks for your comment Kiwi! I'll get this with PA SE.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 12:17:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/320943#M82154</guid>
      <dc:creator>Karup</dc:creator>
      <dc:date>2020-04-06T12:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: forcefully logout all GP users from gateways</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/322648#M82510</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Please use the below command to logout all users from the portal but this command could also be working from PAN 9.0.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; request global-protect-portal client-logout portal &amp;lt;value&amp;gt; reason &amp;lt;force-logout&amp;gt; filter-user all-users&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Below is the command to disconnect all users at once from a Gateway but this feature is only available from the PAN-OS 9.0.2&lt;BR /&gt;&lt;BR /&gt;&amp;gt;request global-protect-gateway client-logout-all gateway &amp;lt;value&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Karup&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 10:51:30 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/322648#M82510</guid>
      <dc:creator>Karup</dc:creator>
      <dc:date>2020-04-14T10:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: forcefully logout all GP users from gateways</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/323868#M82728</link>
      <description>&lt;P&gt;I'm on 8.1, so I used the API to loop through users and log them off.&amp;nbsp; I came up with this set of commands that I can run from any linux box with curl and xmllint&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;FW=your_firewall_name
GW=your_gateway_name
# read admin password into environment variable so it is hidden from history file
read -s pass
# get a key to use the api
install -m 0600 /dev/null pa_${FW}.key
RESP=$(curl -kq https://${FW}/api --data-urlencode "type=keygen" --data-urlencode "user=admin" --data-urlencode "password=${pass}")
xmllint --xpath "//key/text()" &amp;lt;(echo $RESP) &amp;gt; pa_${FW}.key
# get connected users, then loop over them to log them off
USERS=$(curl -kq  https://${FW}/api -d "type=op" -d "cmd=&amp;lt;show&amp;gt;&amp;lt;global-protect-gateway&amp;gt;&amp;lt;current-user&amp;gt;&amp;lt;gateway&amp;gt;${GW}&amp;lt;/gateway&amp;gt;&amp;lt;/current-user&amp;gt;&amp;lt;/global-protect-gateway&amp;gt;&amp;lt;/show&amp;gt;" -d "key=$(cat pa_${FW}.key)")
for i in $(seq $(xmllint --xpath "count(//username)" &amp;lt;(echo $USERS) )); do 
  U=$(xmllint --xpath "//entry[$i]/username/text()" &amp;lt;(echo $USERS))
  D=$(xmllint --xpath "//entry[$i]/domain/text()" &amp;lt;(echo $USERS))
  C=$(xmllint --xpath "//entry[$i]/computer/text()" &amp;lt;(echo $USERS))
  echo logout: ${C}:${D}:${U}
  curl -kq https://${FW}/api -d "type=op" -d "cmd=&amp;lt;request&amp;gt;&amp;lt;global-protect-gateway&amp;gt;&amp;lt;client-logout&amp;gt;&amp;lt;computer&amp;gt;${C}&amp;lt;/computer&amp;gt;&amp;lt;domain&amp;gt;${D}&amp;lt;/domain&amp;gt;&amp;lt;user&amp;gt;${U}&amp;lt;/user&amp;gt;&amp;lt;gateway&amp;gt;${GW}-N&amp;lt;/gateway&amp;gt;&amp;lt;/client-logout&amp;gt;&amp;lt;/global-protect-gateway&amp;gt;&amp;lt;/request&amp;gt;" -d "key=$(cat pa_${FW}.key)"
done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 17:31:09 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/forcefully-logout-all-gp-users-from-gateways/m-p/323868#M82728</guid>
      <dc:creator>alowther_chatham</dc:creator>
      <dc:date>2020-04-20T17:31:09Z</dc:date>
    </item>
  </channel>
</rss>

