OpenVPN Auto Restart upon drop
-
I apologize if this topic has been asked and answered in the past. I did my best to search for this topic. I constantly find my OpenVPN connections (via PIA) disconnected/dropped and my machines running back on my personal IP. I'm sure I can set it to completely stop working if the VPN drops, but it would be much much worse to loose connection (and possibly remote access). I've searched the internet for some solutions. I've seen some comments about some commands that could be added to the advanced settings, but noting that I really trust. Nothing that seems to be validated.
Does anyone have a solution for setting the pfSense OpenVPN client to AUTO RESTART if it drops. It seems like such an easy thing. When I find the the VPN stopped or in a dropped status, I simply have to click the restart button and DONE. It's back up in a second. I don't know why there isn't an option to have that done automatically. Maybe there is. I just don't know about it.
Any ideas? Thanks.
-
It depends on why it stopped. If it fails because of an auth error at PIA, then OpenVPN considers that fatal and exits. We have a fix for that on 2.4.1 and later (using "auth-retry nointeract")
If there is something else causing it to exit, then the fix would be different. Have to see the error in the OpenVPN logs to know for sure.
If the process is exiting, then using the Service Watchdog package to monitor it will help treat the symptom, but not cure the original problem.