Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to restart specific vpn tunnel via cli

    Scheduled Pinned Locked Moved IPsec
    7 Posts 2 Posters 4.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ejajE
      ejaj
      last edited by

      Hello Experts -

      we have multiple tunnels but we require to restart one particular tunnel Can we restart one particular ipsec tunnel via cli.(like GUI disconnect connect) we want to restart it via command line.

      ejajE 1 Reply Last reply Reply Quote 0
      • ejajE
        ejaj @ejaj
        last edited by

        have anyone answer about above question? Please help please.

        1 Reply Last reply Reply Quote 0
        • K
          Konstanti
          last edited by Konstanti

          Hi,
          Try so
          ipsec down <connection name> (for example, con2000 )
          and then
          ipsec up <connection name>
          https://wiki.strongswan.org/projects/strongswan/wiki/Ipseccommand

          0_1542876043887_527b2f3d-5c96-479c-933c-ddcc6712fce9-image.png

          ejajE 2 Replies Last reply Reply Quote 0
          • ejajE
            ejaj @Konstanti
            last edited by

            @konstanti Thanks Sir , let me try it and get back you with an update.

            1 Reply Last reply Reply Quote 0
            • ejajE
              ejaj @Konstanti
              last edited by

              @konstanti Hello ,

              Thanks Konstani but we doubt connection name what exact ? i mean is you talking about description or anything else.

              K 1 Reply Last reply Reply Quote 0
              • K
                Konstanti @ejaj
                last edited by Konstanti

                @ejaj
                /var/etc/ipsec/ipsec.conf
                https://wiki.strongswan.org/projects/strongswan/wiki/ConnSection

                for example,
                0_1542950879343_e1f3d132-2bbf-4931-a839-1feecc496ac0-image.png

                or from cli
                ipsec statusall
                0_1542951382721_e0095bc7-f41f-4a61-84e5-5f526d3357d3-image.png

                ejajE 1 Reply Last reply Reply Quote 0
                • ejajE
                  ejaj @Konstanti
                  last edited by

                  @konstanti

                  Sir you are truly genius ,it working for us Thank you so so much.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.