Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
SHussain
Explorer
Jump to solution

API - Get VPN Active Client Info

I am looking for a way to view all VPN users who are currently connected. I need to see their IP, internal IP, as well as username.

I am able to get this information with the following command: vpn tu list tunnels

My question is what is the API equivalent to this? I have been looking through the documentation and could not get any meaningful data returned that is similar to the data that returns with the CLI command above. Any assistance is greatly appreciated.

0 Kudos
1 Solution

Accepted Solutions
PhoneBoy
Admin
Admin

There are no API commands for this information that I am aware of.
However, you can use the run-script API with the relevant commands and get the same data.

View solution in original post

(1)
6 Replies
PhoneBoy
Admin
Admin

There are no API commands for this information that I am aware of.
However, you can use the run-script API with the relevant commands and get the same data.

(1)
SHussain
Explorer

Thank you. As a follow-up, I've got an API key generated with read-only permissions. We are trying to execute the run-script API against the management with a target of the gateway and receive a no permissions to run action. Any ideas to point us in the right direction?

We also tried to run the API against the gateway and receive access denied even when trying to generate a session token.

 

0 Kudos
PhoneBoy
Admin
Admin

Read only users cannot use run-script.

the_rock
Legend
Legend

I checked api guide and cant find anything similar to what you are asking. The closest I had seen is script made by @Danny below.

Andy

https://community.checkpoint.com/t5/Scripts/Remote-Access-VPN-Statistics-One-liner/td-p/79047

https://community.checkpoint.com/t5/Scripts/Show-VPN-Users-One-liner/m-p/134011#M890

 

(1)
Zolocofxp
Collaborator

I use this command on the active gateway...

fw tab -t userc_users -u -f > users.csv

This will generate a csv file which I then open in Excel to format it if needed. Hope it helps.

the_rock
Legend
Legend

Someone from TAC gave me that while ago, its very good command indeed.

Andy

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events