This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error/Bug while creating IPSec VPN with powershell script using Restful API

Hi All,

 

I've created and use a powershell script that creates, "dns host", "remote network", "psk", "remote gateway" and "ipsec connection" using the restful api.

The object creation appears to go smoothly but i can't connect the tunnel before doing two procedures with no specific order.

The first one, edit the "ipsec connection" and save it (with no changes made).

Secondly edit the "remote gateway", double click the "network object" in remote networks and save it (with no changes made) as i press save on my ipsec log appears the information "added connection description "vpn_name" and the tunnel works perfectly from that point on.

After some testing i've found out that the ipsec connection adds one configuration when i save it, the "used in this configurations" field shows new information (see image) and on the restful API the option /nodes/ipsec.connections gets a new entry (the object Ref).

For this option i only have the "PUT" command and as is my understanding "PUT" overwrites the previous values, so i have to try a little with the code but i think it can be done.

 

 

What i'm having trouble to understand is why the need to save the Network object, and how i can surmount that. 



This thread was automatically locked due to age.
Parents
  • Olá Pedro and welcome to the UTM Community!

    I think you've uncovered a bug.  Please get a ticket open with Sophos Support so they can inform the developer.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Reply
  • Olá Pedro and welcome to the UTM Community!

    I think you've uncovered a bug.  Please get a ticket open with Sophos Support so they can inform the developer.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Children
No Data