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

Change some VPN Community settings with mgmt_cli

Hello 

I'm creating a script to configure VPN Communities. 

Mgmt_cli is used for this. 

The creation is not the problem. That work fine. 

I'm looking for a solution to set the "Permanent Tunnels" and the "VPN Routing" settings. 

The communities are VPN Star Communities. 

On the management api referece there is no solution documented by  "add vpn-community-star" or "set vpn-community-start".

Or I don't see it 🙂 

Can anybody help me? 

 

Regards 

Matthias 

0 Kudos
1 Solution

Accepted Solutions
Thias
Participant

Hello again 

I found a solution. 

Here is an old thead. But it still work. 

https://community.checkpoint.com/t5/API-CLI-Discussion/Missing-API-possibility-to-set-vpn-community-...

 Kim_Moberg has do it with a generic-object. And this is also working for the VPN Routing settings. 

Here is my code via powershell

 & $MGMTCLI  set generic-object uid `
    (& $MGMTCLI show vpn-community-star name ("VPNCommunity-" + $a.VPNComName) -f json -s $SessionID | ConvertFrom-Json).UID `
    routeThroughCenter TO_OTHER_SATELLITE `
    -f json -s $SessionID

For the VPN routing the routeThroughCenter must be set.

Values are

NONE --> To center only

TO_OTHER_SATELLITE --> To center and to other satellites through center 

BY_DEFAULT --> To center or through the center to outher satellites, to Internet and other VPN targets

I hope it is helpful for some one 

Matthias 

View solution in original post

0 Kudos
1 Reply
Thias
Participant

Hello again 

I found a solution. 

Here is an old thead. But it still work. 

https://community.checkpoint.com/t5/API-CLI-Discussion/Missing-API-possibility-to-set-vpn-community-...

 Kim_Moberg has do it with a generic-object. And this is also working for the VPN Routing settings. 

Here is my code via powershell

 & $MGMTCLI  set generic-object uid `
    (& $MGMTCLI show vpn-community-star name ("VPNCommunity-" + $a.VPNComName) -f json -s $SessionID | ConvertFrom-Json).UID `
    routeThroughCenter TO_OTHER_SATELLITE `
    -f json -s $SessionID

For the VPN routing the routeThroughCenter must be set.

Values are

NONE --> To center only

TO_OTHER_SATELLITE --> To center and to other satellites through center 

BY_DEFAULT --> To center or through the center to outher satellites, to Internet and other VPN targets

I hope it is helpful for some one 

Matthias 

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events