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

    Start IpSec via Command Line

    Scheduled Pinned Locked Moved IPsec
    3 Posts 2 Posters 6.8k 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.
    • J
      JustLeo
      last edited by

      Is there a way to start an IpSec Tunnel from the command line? I tried with wget, curl, service ipsec start, nothing is working for me.
      The version of pfsense that I'm using is: 2.3.2

      Thanks.

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

        That depends, if you want to stop and start the entire ipsec service, use:  pfSsh.php playback svc stop ipsec or pfSsh.php playback svc start ipsec

        If you only want to control a single tunnel, that is trickier, but possible with the "ipsec" command (use "ipsec –help" for some pointers on its use)

        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!

        1 Reply Last reply Reply Quote 0
        • J
          JustLeo
          last edited by

          I found the way: /usr/local/sbin/ipsec up <connection name="">and the connection name I can take it from this file: /var/etc/ipsec/ipsec.conf which is automatically generated.
          Problem now is that after creating a new IpSec tunnel via Command Line, ipsec.conf file is NOT getting updated and I cannot start my IpSec tunnel from a command. Thoughts?
          I already tried with these commands:

          /usr/local/sbin/ipsec update
          /usr/local/sbin/ipsec reload</connection>

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