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

    Reset racoon command line

    Scheduled Pinned Locked Moved IPsec
    6 Posts 5 Posters 3.9k 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.
    • X
      Ximerian
      last edited by

      I've tried the script located here but I get the following error.

      
      ./resetipsec.php
      
      Fatal error: Call to undefined function is_process_running() in /etc/inc/vpn.inc on line 936
      
      

      I can't find which include has is_process_running() function otherwise I would just include that one also. Anyone know?

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        cmb@:~/gitroot/pfsense-mainline$ grep -r "function is_process_running" *
        etc/inc/util.inc:function is_process_running($process) {

        need util.inc

        1 Reply Last reply Reply Quote 0
        • X
          Ximerian
          last edited by

          Thank you cmb!

          1 Reply Last reply Reply Quote 0
          • W
            wescb
            last edited by

            Anyone have any luck with this script in pfSense 2.0.1?

            My final script is:

            #!/usr/local/bin/php -q
            require_once('vpn.inc');
            require_once('util.inc');
            
            vpn_ipsec_force_reload();
            ?>
            

            It runs for several seconds and I show racoon as "Stopped" in Status > Services but it never seems to actually restart. Starting it again manually (via the web GUI) seems to work normally.

            I'm looking for a (simple) way to restart racoon with cron each day.

            Thanks

            1 Reply Last reply Reply Quote 0
            • D
              dalequalls
              last edited by

              I'm having a similar problem.  When I run the php script to check and reset racoon I get the following response:

              Fatal error: Call to undefined function conf_mount_rw() in /etc/inc/pkg-utils.inc on line 83

              I'm using IPSec for connectivity from an iPad.  IPSec runs for awhile until I disconnect from the VPN.  After doing that I can't reconnect to IPSec until I tick and re-tick the "enable IPSec" checkbox in the admin gui and click on save.

              Is there an easier fix?  I'm running 2.0.1.

              TIA!

              Dale

              1 Reply Last reply Reply Quote 0
              • T
                TimmZahn
                last edited by

                I too would like to restart racoon with cron every day. Since racoon doesn't appear to be able to restart itself once it stops, I need to be able to have a cron job start/restart it at a specific time each day.

                None of the examples of starting or restarting racoon from the command line that I've searched for seem to actually work on pfSense version 2.0.1 release.

                Is there a parameter somewhere that will tell racoon to automatically restart if it is stopped?

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