Doing same action of Disconnect button in VPN IPSEC Status via script

Started by renow, October 15, 2022, 07:33:13 PM

Previous topic - Next topic
Hi,

I think, it's the first time in my life that a web button is better than a script command !

I have an IPSEC tunnel which lost often some of his phase 2,

- if I Disconnect from Status page, then reconnect.
-> All Phase 2 restart

If I script (for automation)
ipsec down con2
and
ipsec up con2,

-> only phase2 previously up restart...

Someone knows what more is doing disconnect button ?
Thanks for your help.
Regards,
Renaud MEDICI.

I don't understand the question 100% but the scripts are

# configctl ipsec connect <conX>
# configctl ipsec disconnect <conX>

The actual scripts are /usr/local/opnsense/scripts/ipsec/connect.py and /usr/local/opnsense/scripts/ipsec/disconnect.py if you want to inspect them further.

Hope that helps.


Cheers,
Franco

Hi Franco,

Thanks for your answer.
It works fine with configctl scripts.

Cheers,
Renaud MEDICI.