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

    IPSec connect through CLI?

    Development
    2
    3
    381
    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.
    • M
      meluvalli
      last edited by

      Is there a command I can send to connect P1 and P2 IPSec connections from CLI?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Yes, what you want is the swanctl command.

        For example to initial P1 and P2 for a P2 with an internal id of con1, then you would run:

        $ swanctl --initiate --child con1
        

        To see the IDs and so on, look at /var/etc/ipsec/swanctl.conf or they can be dumped from swanctl with commands like swanctl --list-conns

        Check the strongSwan docs for swanctl if you want to know more about how that all works.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        M 1 Reply Last reply Reply Quote 1
        • M
          meluvalli @jimp
          last edited by

          @jimp Thank you! That worked!

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