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

    Schedules for IPSec tunnels

    Scheduled Pinned Locked Moved IPsec
    8 Posts 4 Posters 713 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.
    • S
      sepp_huber
      last edited by

      Hi,

      we have configured a new IPSec Tunnel to Amazon AWS VPC.
      Amazon charges $0.05 per VPN Connection-Hour... we really do not need the tunnel 24/7 ;-)

      To save money the idea is to stop and start the tunnel with a crontable entry.

      My question: how can I start/stop or enable/disable a particular IPSec tunnel on the command line?

      1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8
        last edited by

        i know that you can start / stop ipsec services with

        pfSsh.php playback svc stop ipsec
        pfSsh.php playback svc start ipsec
        

        but i don't know for a specific tunnel if it's possible

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

        1 Reply Last reply Reply Quote 0
        • S
          sepp_huber
          last edited by

          many thx kiokoman this solution is working as cron entries ;-)

          Unfortunately I have other vpn tunnels which must be up, so I cannot use it.

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

            @sepp_huber
            Hey
            Perhaps this will help

            https://wiki.strongswan.org/projects/strongswan/wiki/IpsecCommand

            ipsec up <name>
            
            tells the IKE daemon to start up connection <name>. Implemented by calling the ipsec stroke up <name> command.
            
            ipsec down <name>
            
            tells the IKE daemon to terminate connection <name>. Implemented by calling the ipsec stroke down <name> command.
            

            For example ,

            ipsec down con2000

            1 Reply Last reply Reply Quote 0
            • S
              sepp_huber
              last edited by

              @Konstanti many thx .. that's it

              btw. the connection name is displayed in the first column in the IPSec-Status Page table:
              "con1000: #4" => con1000

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by Derelict

                @sepp_huber Amazon will bill you whether the tunnel is up or down. You have to completely disable it on the AWS side to stop the billing.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • S
                  sepp_huber
                  last edited by

                  Nice try :-(

                  @Derelict : thx for the hint.

                  Off-Topic:
                  There is no feature to disable it, it must be deleted to stop billing ... and if you create it again you get a new configuration, not very cost efficient...

                  https://forums.aws.amazon.com/thread.jspa?threadID=83161

                  1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate
                    last edited by

                    @sepp_huber said in Schedules for IPSec tunnels:

                    There is no feature to disable it, it must be deleted to stop billing ... and if you create it again you get a new configuration, not very cost efficient...

                    That's why many people put pfSense in AWS and IPsec to that.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

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