Script to reload automatically VPN



  • Hello,

    I have any issue on my pfense for some of my IPSEC VPN connexions.

    Sometimes, I have to "connect VPN" manually clicking on the button to make the connexion alive again.

    Is there any way to automatize with a script ?

    Thank you.

    Best regards.

    Fabien



  • I think you're best looking at why the VPNs are disconnecting rather than trying create a workaround for this. If you could maybe give some idea of your setup we could look at how best to resolve it rather than work around it. Maybe if you could post your config of the failing setup or even some of the IPsec logs would be useful also.



  • Hello,

    Thank you but the problem is that I haven't any logs and I can't investigate more.

    I have lots of tunnel and I experiment problems with only one client.

    Thank you.

    Fabien



  • You can use /usr/local/sbin/ipsec up con <number>Loop up the number in ipsec.conf.

    Use the command in cron(package)

    What device on the other side do you have problems with? I use this for connections to Fortigate devices, failing with phase2 rekeying.</number>


Log in to reply