- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: API - Get VPN Active Client Info
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read only users cannot use run-script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Someone from TAC gave me that while ago, its very good command indeed.
Andy
