Guest User!

You are not Sophos Staff.

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

Activate and deactivate IPsec connection via CLI

Hi,

I'm trying to activate and deactivate a specific IPsec connection via CLI.
Already tried "ipsec down <name>" at advanced shell, but that has no effect on the VPN connection.

In simple terms, I want to simulate a push of this button:

I welcome any suggestions on how it could work.
Many thanks!

Best regards,
Daniel



This thread was automatically locked due to age.
  • Why doing this on the Shell? You could do this via API by saving the same rule again. 

    __________________________________________________________________________________________________________________

  • Ahh. I haven't thought about the API yet. Thanks for the tip! I will have a look if I can solve it elegantly with it.

  • Many thanks! With the API, I was able to solve it.

    In case someone needs the same and finds this thread. This is how it works:

    Deactivate connection:

    IP.OF.THE.FIREWALL:4444/.../APIController passwordform="encrypt">PASSWORD.AS.HASH.SEE.API.DOCUMENTATION</Password></Login><Set><VPNIPSecConnection><DeActive><Name>VPN.CONNECTION.NAME</Name></DeActive></VPNIPSecConnection></Set></Request>

    Activate connection:

    IP.OF.THE.FIREWALL:4444/.../APIController passwordform="encrypt">PASSWORD.AS.HASH.SEE.API.DOCUMENTATION</Password></Login><Set><VPNIPSecConnection><Active><Name>VPN.CONNECTION.NAME</Name></Active></VPNIPSecConnection></Set></Request>

    EDIT: Sadly the editor is destroying the URLs, therefore here additionally as screenshot:

Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?