-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from alagoutte/ipsec
Add Get IPsec cmdlets
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# | ||
# Copyright 2019, Alexis La Goutte <alexis dot lagoutte at gmail dot com> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
function Get-FGTVpnIpsecPhase1Interface { | ||
|
||
<# | ||
.SYNOPSIS | ||
Get list of all VPN IPsec phase 1 (ISAKMP) settings | ||
.DESCRIPTION | ||
Get list of all VPN IPsec phase 1 (name, IP Address, description, pre shared key ...) | ||
.EXAMPLE | ||
Get-FGTVpnIPsecPhase1Interface | ||
Get list of all settings of VPN IPsec Phase 1 interface | ||
#> | ||
|
||
$response = Invoke-FGTRestMethod -uri 'api/v2/cmdb/vpn.ipsec/phase1-interface' -method 'GET' | ||
$response.results | ||
} | ||
|
||
|
||
|
||
function Get-FGTVpnIpsecPhase2Interface { | ||
|
||
<# | ||
.SYNOPSIS | ||
Get list of all VPN IPsec phase 2 (IKE) settings | ||
.DESCRIPTION | ||
Get list of all VPN IPsec phase 2 (Local / Remote Network PFS, Cipher, Hash...) | ||
.EXAMPLE | ||
Get-FGTVpnIPsecPhase2Interface | ||
Get list of all settings of VPN IPsec Phase 2 interface | ||
#> | ||
|
||
$response = Invoke-FGTRestMethod -uri 'api/v2/cmdb/vpn.ipsec/phase2-interface' -method 'GET' | ||
$response.results | ||
} |