CLI Options to Re-establish Collapsed Tunnel
-
I have two tunnels between AWS and a PFSense VM (I have paid support, but this is not a super critical issue at this time).
Tunnel 1 keeps going down after several days, tunnel 2 stays online. I have not found the reason for this, though I have spent very little time on it. If I click on "Connect VPN" the tunnel is established.
What I want to do is implement a script that will respond to the alert email I get from AWS by re-establishing the one tunnel over ssh, without interrupting the other. What would be the ipsec commands to list the tunnels, and restart a specific one? Sorry for the stupid question.
-
https://github.com/pfsense/pfsense/blob/v2.4.4_3/src/usr/local/www/status_ipsec.php#L46
/usr/local/sbin/ipsec up <conn id>
There is a bit more control there on 2.5.0 since
swanctl
has more friendly options for bringing parts up/down as needed. -
@jimp Thanks! Will start digging into this.