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

IPSec connect through CLI?

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 381 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.
  • M
    meluvalli
    last edited by Mar 10, 2023, 12:55 PM

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

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Mar 10, 2023, 2:39 PM

      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 Mar 11, 2023, 12:17 AM Reply Quote 1
      • M
        meluvalli @jimp
        last edited by Mar 11, 2023, 12:17 AM

        @jimp Thank you! That worked!

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received