Comments (3)
Hi,
There is actually no cmdlet for monitoring info but you can try
PS > (Invoke-FGTRestMethod api/v2/monitor/vpn/ipsec).results
but not sure if there is all info (i can't try, i don't have dial up IPsec VPN)
FYI for VPN SSL, there is info :
PS > (Invoke-FGTRestMethod api/v2/monitor/vpn/ssl/stats).results
conserve_mode max current
------------- --- -------
False @{users=4; tunnels=4; connections=17} @{users=3; tunnels=3; connections=3}
PS > (Invoke-FGTRestMethod api/v2/monitor/vpn/ssl).results
index : 0
user_name : alagoutte
remote_host : 192.2.0.1
last_login_time : Thu Mar 26 16:31:10 2020
last_login_timestamp : 1585236670
subsessions : {@{index=1; parent_index=0; mode=Tunnel; type=Unknown; aip=10.200.250.1; in_bytes=121297;
out_bytes=176457; desthost=}}
subsession_type : Unknown
subsession_desc : aip:10.200.250.1
index : 1
user_name : user1
remote_host : 192.2.0.2
last_login_time : Thu Mar 26 18:33:30 2020
last_login_timestamp : 1585244010
subsessions : {@{index=2; parent_index=1; mode=Tunnel; type=Unknown; aip=10.200.250.2; in_bytes=264932;
out_bytes=162526; desthost=}}
subsession_type : Unknown
subsession_desc : aip:10.200.250.2
index : 2
user_name : user3
remote_host : 192.2.0.3
last_login_time : Thu Mar 26 19:34:58 2020
last_login_timestamp : 1585247698
subsessions : {@{index=3; parent_index=2; mode=Tunnel; type=Unknown; aip=10.200.250.3; in_bytes=42305;
out_bytes=88058; desthost=}}
subsession_type : Unknown
subsession_desc : aip:10.200.250.3
from powerfgt.
Hi,
You can use this:
(Invoke-FGTRestMethod -uri api/v2/monitor/vpn/ipsec/select | select -ExpandProperty results | Where-Object { $_.parent -eq "DialUpVPN_Name" }).count
Simply change the name of your VPN DialUp!
from powerfgt.
Also, If you want stats, you can remove the ".count" at the end of the command:
Invoke-FGTRestMethod -uri api/v2/monitor/vpn/ipsec/select | select -ExpandProperty results | Where-Object { $_.parent -eq "AgencesXXX" }
proxyid : {@{proxy_src=System.Object[]; proxy_dst=System.Object[]; status=up; p2name=AgencesXXX; p2serial=6; expire=22098; incoming_bytes=6700940; outgoing_bytes=8528150}}
name : AgencesXXX_0
parent : AgencesXXX
comments :
wizard-type : custom
connection_count : 37
creation_time : 2853730
type : dialup
incoming_bytes : 100365986
outgoing_bytes : 190013198
rgwy : x.x.x.x
dialup_index : 0
proxyid : {@{proxy_src=System.Object[]; proxy_dst=System.Object[]; status=up; p2name=AgencesXXX; p2serial=1; expire=19267; incoming_bytes=147396; outgoing_bytes=175500}}
name : AgencesXXX_1
parent : AgencesXXX
comments :
wizard-type : custom
connection_count : 20
creation_time : 1707688
type : dialup
incoming_bytes : 95245694
outgoing_bytes : 492716106
rgwy : x.x.x.x
dialup_index : 5
proxyid : {@{proxy_src=System.Object[]; proxy_dst=System.Object[]; status=up; p2name=AgencesXXX; p2serial=1; expire=22146; incoming_bytes=9059632; outgoing_bytes=28578140}}
name : AgencesXXX_2
parent : AgencesXXX
comments :
wizard-type : custom
connection_count : 6
creation_time : 450039
type : dialup
incoming_bytes : 107147958
outgoing_bytes : 492447404
rgwy : x.x.x.x
dialup_index : 13
from powerfgt.
Related Issues (20)
- Question about use Remove-FGTFirewallPolicy HOT 2
- Set/Remove-FGTFirewallAddress not working when piping object from Get-FGTFirewallAddress HOT 4
- Failure to connect when post-login-banner is configured HOT 6
- Error connecting with v0.5.0 HOT 2
- Get IPsec vpn phase1 PSK HOT 6
- Filtering does not work correctly in old operating systems (5.x) HOT 10
- Align Filtering with FortiManager (PowerFMG) HOT 1
- Display the progress BAR HOT 5
- Bug with diacritics HOT 9
- Upgrade Path HOT 3
- Upgrade path error HOT 2
- Backup config isn't working HOT 1
- When using the "Remove-FGTFirewallAddressGroupMember" cmdlet, nothing happens HOT 12
- Reg Connect-FGT HOT 4
- Connecting with FortiToken? HOT 3
- Getting Arp Table HOT 2
- Can you create new users? HOT 9
- Upload and replace renewed SSL Certificate offline HOT 3
- Move-FGTFirewallPolicy function problem HOT 1
- Custom HTTPS port? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerfgt.