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

    CLI Options to Re-establish Collapsed Tunnel

    Scheduled Pinned Locked Moved IPsec
    3 Posts 2 Posters 356 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.
    • L
      luxadmin
      last edited by

      I have two tunnels between AWS and a PFSense VM (I have paid support, but this is not a super critical issue at this time).

      Tunnel 1 keeps going down after several days, tunnel 2 stays online. I have not found the reason for this, though I have spent very little time on it. If I click on "Connect VPN" the tunnel is established.

      What I want to do is implement a script that will respond to the alert email I get from AWS by re-establishing the one tunnel over ssh, without interrupting the other. What would be the ipsec commands to list the tunnels, and restart a specific one? Sorry for the stupid question.

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

        https://github.com/pfsense/pfsense/blob/v2.4.4_3/src/usr/local/www/status_ipsec.php#L46

        /usr/local/sbin/ipsec up <conn id>

        There is a bit more control there on 2.5.0 since swanctl has more friendly options for bringing parts up/down as needed.

        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!

        L 1 Reply Last reply Reply Quote 1
        • L
          luxadmin @jimp
          last edited by

          @jimp Thanks! Will start digging into this.

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