Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 

Remote Access VPN Statistics - One-liner

Danny
Champion Champion
Champion

COVID-19  💊 We take care of your Remote Access VPN needs!
👩‍💻 Reviewed by RnD.
👍 Available as SmartConsole Extension.

One-liner (Bash) to show a summary about the remote access statistics of a VPN gateway.
Run in SmartConsole as one-time script or from your scripts repository or directly on your Gateway in expert mode:


    echo; if [[ `if [[ $(cat /etc/cp-release) == *"Embed"* ]]; then grep 1 /opt/fw1/conf/active_blades.txt | tr '[:upper:]' '[:lower:]'; else e
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free

Disclaimer: Check Point does not provide maintenance services or technical or customer support for third party content provided on this Site, including in CheckMates Toolbox. See also our Third Party Software Disclaimer.




(2)
80 Replies

Wolfgang
Authority
Authority

@Danny 

great job. I love these oneliners.

Wolfgang

 

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


Alexey_Klichins
Explorer

great , I was looking for it.

 The statistics match for   the last hour/day/week ?

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

NSS_Fujitsu_Ser
Explorer

I can understand that the current number is the live stat from the gateway at the point in time of running the one liner but what about the peak number? - that must be historical, surely?  Over what historical period?

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

The peak number is always counted since last reboot of the system.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Victor_MR
Employee Employee
Employee
Very good! Thanks for sharing. ;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

👍

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Wolfgang
Authority
Authority

@Danny 

running in export mode is fine, but from Smartconsole repository some small formatting errors are seen.

SmartConsole.PNG

Maybee you can find the problem.

Wolfgang 

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

Thanks @Wolfgang, I fixed it.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Bechor
Employee Alumnus
Employee Alumnus

It will show also Capsule Workspace connected Users?

Capsule Workspace it part of MAB Portal Users count?

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

Hi @Bechor, I've just included stats for Capsule Workspace users as well. ✔️

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


Bechor
Employee Alumnus
Employee Alumnus
That's great!
Thank you! ;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Eduardo_Pereira
Employee Alumnus
Employee Alumnus

Untitled.png

Untitled2.png

 

Hi Danny, thank you for the great one-liner script!

It's certainly helping a lot.

Quick feedback on when running Gateways CG IaaS (VE), the outcome is "Not a firewall gateway!".

We had to bypassed it by getting rid of the first "if" of the script.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


Danny
Champion Champion
Champion

Thanks for the enabled_blades tip, @Eduardo_Pereira, I just improved the One-liner to check the VPN blade.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


PatrikSkoglund
Contributor
Quality one-liners as always! ;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


Danny
Champion Champion
Champion

Thanks @PatrikSkoglund! 😃

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


Saagarg007
Contributor

Great script for quick stats,

so are they full day stats? or current stats?

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

Thanks for the tip. I'll add the word 'current' to the title. The peak score is an overall status since last reboot of the system.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


Pedro_Domingo_P
Explorer

Hi :

Thank you very much for your work 

I have spent tons of hours trying to do the same thing

In my script I have used the following kernel table to obtain SNX users:

  1. SNX users ---> fw tab -t sslt_connectra_sessions -s

I have counted the lines with SNX users on the smartview monitor users table, and with this number I could find the "correct" kernel table 

If I use your script,  the number shown is different from the number that you can obtain from   the kernel table s

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Emanuel_Miut
Participant

Great job! Thx for very useful one liner.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

I'm glad you like it.  🙂

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Eduardo_Pereira
Employee Alumnus
Employee Alumnus

Hey  @Danny,

This is a one-liner that I did for a client few days ago to monitor VPN clients and the performance of the appliance. It was a huge appliance with thousands of users.

It help to find any heavy connections and monitor the connected users real time.

Have you ever wrote something to find/monitor heavy connections/elephant flows? (VPN or not related).

monitor VPN heavy conn.jpg

Script:

watch -n 0.1 "echo ' CPU UTILIZATION'; printf '%.s-' {1..100}; echo;echo;mpstat -P ALL 1 1 | gre

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


Danny
Champion Champion
Champion

Thanks for sharing your code with us.  😀 I haven't yet created a solution to identify top VPN remote users.

It's impressive to see what we can bring up together while working from home focusing on getting home workers connected and protected maintaining their businesses during COVID-19.

corona.gif

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Eduardo_Pereira
Employee Alumnus
Employee Alumnus
True that! 😉

Let me know if you ever get inspiried to code such thing! 😉

Thank you! ;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

Will do!  😉

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Fred_Crumedy
Participant

Do you have a script that can check to see if specific remote access users are actively connected across multiple remote access gateways within the same mds domain?

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

That feature is currently not implemented. Maybe you add it and contribute to this community?

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Cristian_F_CCSM
Contributor
Contributor

Super thank you.
This is a super mega command, very useful.
Thanks again

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Danny
Champion Champion
Champion

I'm glad it's useful to you. This one-liner also got reviewed by R&D today as Check Point SE's now use it, too.  👩‍💻

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos