Skip to content

Commit

Permalink
Merge pull request #38 from alagoutte/ipsec
Browse files Browse the repository at this point in the history
Add Get IPsec cmdlets
  • Loading branch information
alagoutte authored Apr 28, 2019
2 parents 03ad2c7 + 68b592a commit 09483af
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions PowerFGT/Public/cmdb/vpnipsec.ps1
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
}

0 comments on commit 09483af

Please sign in to comment.