Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Stop OpenVPN Client if WAN Gateway is down.
« previous
next »
Print
Pages: [
1
]
Author
Topic: Stop OpenVPN Client if WAN Gateway is down. (Read 2156 times)
multimania
Newbie
Posts: 21
Karma: 0
Stop OpenVPN Client if WAN Gateway is down.
«
on:
March 21, 2021, 10:39:12 am »
Hello,
i have problems with my opnsense as OpenVPN Client.
If i lost the WAN Connection, the OpenVPN Client is not going up.
If i stop the OpenVPN client and start again, it works.
What can i do to stop die OpenVPN Client on opnsense if my upstream WAN Gateway is marked as DOWN. And if the gateway is UP again start the OpenVPN Client again.
Thanks for your help.
Multi
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: Stop OpenVPN Client if WAN Gateway is down.
«
Reply #1 on:
March 21, 2021, 10:41:25 am »
I suggest using monit to monitor the PID for the gateway
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: Stop OpenVPN Client if WAN Gateway is down.
«
Reply #2 on:
March 21, 2021, 10:45:31 am »
This is in a different context and for a different purpose, but it may help with ideas:
https://forum.opnsense.org/index.php?topic=18745.msg97953#msg97953
Logged
multimania
Newbie
Posts: 21
Karma: 0
Re: Stop OpenVPN Client if WAN Gateway is down.
«
Reply #3 on:
March 21, 2021, 05:36:34 pm »
thanks i have add a service to monit and can check the gw.
But i cant find a command to stop the openvpn client or start the client.
Logged
multimania
Newbie
Posts: 21
Karma: 0
Re: Stop OpenVPN Client if WAN Gateway is down.
«
Reply #4 on:
March 21, 2021, 05:50:33 pm »
i have try this:
https://forum.opnsense.org/index.php?topic=6979.msg30763#msg30763
But i thik it is too old, and dont work:
Code:
[Select]
/usr/local/etc/rc.d/client1 onestatus
client1 is not running.
stop and start works didnt work to.
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: Stop OpenVPN Client if WAN Gateway is down.
«
Reply #5 on:
March 21, 2021, 08:25:51 pm »
https://github.com/opnsense/core/issues/412
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Stop OpenVPN Client if WAN Gateway is down.