Start IpSec via Command Line

  • 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


  • Rebel Alliance Developer Netgate

    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)

  • 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>

Log in to reply