How to limit concurrent GlobalProtect connections per user

Reply
L3 Networker

Re: How to limit concurrent GlobalProtect connections per user

How to run this script when? 

 

 

Re: How to limit concurrent GlobalProtect connections per user

Sorry, I’m not sure what do you mean.
L3 Networker

Re: How to limit concurrent GlobalProtect connections per user

Hi @bernardo.hernandez

 

Sorry to confuse I mean how to deploy the script  I should deploy script on the client as install agent GP?

Highlighted

Re: How to limit concurrent GlobalProtect connections per user

As @vsys_remo mentioned, you should run it on any server or machine that has access to the API of the firewall where you have configured Global Protect.


A few considerations before you can run the script:

 

  1. You are going to need your API key from the firewall. You can get it by replacing the HOSTNAME, USERNAME and PASSWORD fields with your particular information and then copy-paste it in your browser like this:
https://HOSTNAME/api/?type=keygen&user=USERNAME&password=PASSWORD

If everything goes as planned you should get a response like this:

 

<response status="success">
<result>
<key>gJlQWE56987nBxIqyfa62sZeRtYuIo2BgzEA9UOnlZBhU</key>
</result>
</response>

This will be the value of the $apikey variable on the script. 

 

2.- You might need to change the powershell execution policy on your client machine. In my case it was set to "Restricted" which is the default. 

 

To find out what is your current execution policy run the following command:

Get-ExecutionPolicy

To change it, run:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

This will change the execution policy for the curent user on the client machine and will allow you to run the script.

 

Good luck!

 

 

 

 

 

 

 

Tags (1)
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 Live Community as a whole!

The Live Community thanks you for your participation!