Run .php script on pfsense
-
I found the following script
https://dhampir.no/stuff/bash/pfsense-vpnresetit scans IPSEC connections and reinitiate them when one is down.
how can i put this on my pfsense link it to chron so that it runs every 5 minutes for example? -
You could setup your IPsec tunnels better and get the same net effect without a script.
For example, if it's a tunnel mode IPsec connection, if you setup P2 entries with remote hosts to ping, that normally will bring them back up automatically.
For IPsec VTI mode, if you set the child SA close action to "reconnect" on one side that will make them reconnect when they disconnect.
There wouldn't normally be an IKE/P1 issue unless you don't have working DPD on both sides.
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.